PHPackages                             ug-php/clean-architecture-core - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. ug-php/clean-architecture-core

ActiveLibrary[Framework](/categories/framework)

ug-php/clean-architecture-core
==============================

PHP clean architecture core library

v1.2.1(1y ago)269432MITPHPPHP &gt;=8.2

Since Jun 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ug-libraries/clean-architecture-core-php)[ Packagist](https://packagist.org/packages/ug-php/clean-architecture-core)[ Docs](https://github.com/ug-libraries/clean-architecture-core-php)[ RSS](/packages/ug-php-clean-architecture-core/feed)WikiDiscussions 1.2 Synced 1mo ago

READMEChangelog (4)Dependencies (7)Versions (7)Used By (2)

Core Library for Clean Architecture in PHP
==========================================

[](#core-library-for-clean-architecture-in-php)

Introduction
------------

[](#introduction)

This documentation guides you through the utilization of the core library for implementing clean architecture in PHP. We'll explore the creation of custom application requests and use cases, paying special attention to handling missing and unauthorized fields.

Practical examples are provided using code snippets to showcase the library's usage in building a modular and clean PHP application.

Prerequisites
-------------

[](#prerequisites)

Ensure that you have the following:

- `PHP` installed on your machine (version `8.2.0 or higher`).
- `Composer` installed for dependency management.

Installation
------------

[](#installation)

To install the core library, run the following command in your project directory:

```
composer require ug-php/clean-architecture-core
```

Core Overview
-------------

[](#core-overview)

### Application Request

[](#application-request)

Request serve as input objects, encapsulating data from your HTTP controller. In the core library, use the `\Urichy\Core\Request\Request` class as the foundation for creating custom application request objects. Define the expected fields using the `requestPossibleFields` property.

```
