# aphiria **Repository Path**: sweetbai/aphiria ## Basic Information - **Project Name**: aphiria - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: 1.x - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-12-17 - **Last Updated**: 2021-12-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

Coverage Status

> **Note:** This framework is not stable yet. ## Introduction Aphiria is a suite of small, decoupled PHP libraries that make up a REST API framework. It simplifies content negotiation without bleeding into your code, allowing you to write expressive code. Aphiria also provides the following functionality out of the box: * Automatic content negotiation of your POPOs * One of the fastest, most feature-full routers in PHP * A modular way of building your apps from reusable components * A DI container with binders to simplify configuring your app * A model validator for your POPOs * Support for route and validation attributes ```php // Define some controller endpoints #[RouteGroup('/users')] class UserController extends Controller { public function __construct(private IUserService $users) {} #[Post('')] public function createUser(User $user): IHttpResponse { $this->users->create($user); return $this->created("/users/{$user->id}", $user); } #[Get('/:id')] public function getById(int $id): User { return $this->users->getById($id); } } // Bind your dependency $container->bindInstance(IUserService::class, new UserService()); // Run an integration test $this->post('/users', new User(1, 'Dave')); $this->assertParsedBodyEquals(new User(1, 'Dave'), $this->get('/users/1')); ``` ## Installation Create an Aphiria app via Composer: ```bash composer create-project aphiria/app --prefer-dist --stability dev ``` Refer to the [documentation](https://www.aphiria.com/docs/1.x/installation.html) for more details. ## Documentation Full documentation is available at the Aphiria website. ## Requirements * PHP 8.1 ## Contributing We appreciate any and all contributions to Aphiria. Please read the [documentation](https://www.aphiria.com/docs/1.x/contributing.html) to learn how to contribute. ## Community If you have general questions or comments about Aphiria, join our [GitHub Discussions](https://github.com/aphiria/aphiria/discussions). ## Directory Structure Aphiria is organized as a monorepo. Each library is contained in _src/{library}_, and contains _src_ and _tests_ directories. ## License This software is licensed under the MIT license. Please read the [LICENSE](LICENSE.md) for more information. ## Author Aphiria was created and primarily written by [David Young](https://github.com/davidbyoung).