|
1 | 1 | # Antidot Framework
|
2 | 2 |
|
3 |
| -A PHP full featured micro-framework designed to allow you to write 100% framework agnostic code. |
4 |
| - |
5 | 3 | ## Key Features
|
6 | 4 |
|
7 |
| -* **Preconfigured Coding Style**: [Psr-1](https://www.php-fig.org/psr/psr-1) and [Psr-2](https://www.php-fig.org/psr/psr-2) code sniffer to help to respect standard |
8 |
| -* **Logger**: [Psr-3](https://www.php-fig.org/psr/psr-3) implementation by [wshafer/monolog](https://github.com/wshafer/psr11-monolog) |
9 |
| -* **Auto-loading**: [Psr-4](https://www.php-fig.org/psr/psr-4) Namespaces auto-loading |
10 |
| -* **Request Response Lifecycle**: [Psr-7](https://www.php-fig.org/psr/psr-7) Request and responses using [Laminas Diactoros](https://docs.laminas.dev/laminas-diactoros/) |
11 |
| -* **Auto-wired Dependency injection**: [Psr-11](https://www.php-fig.org/psr/psr-11) Auto-wired dependency injection container |
12 |
| -* **Event Dispatcher**: [Psr-14](https://www.php-fig.org/psr/psr-14) Event dispatching system |
13 |
| -* **Request pipeline**: [Psr-15](https://www.php-fig.org/psr/psr-15) Request handler and Middleware |
14 |
| -* **Pipeline based router**: Intuitive to use route system |
15 |
| -* **Different Config Translators**: [Laminas config](https://docs.laminas.dev/laminas-config/) style or [Symfony](https://symfony.com/doc/current/best_practices/configuration.html) style |
16 |
| -* **Cli**: Ready to use Console Line Tool on top of [Symfony Console Tool](https://symfony.com/doc/current/components/console.html) |
| 5 | +The Antidot PHP Framework offers a range of powerful features that make it a versatile choice for |
| 6 | +building web applications. Some of the key features include: |
17 | 7 |
|
| 8 | +### Dependency Injection Container |
18 | 9 |
|
19 |
| -## Quick Start |
| 10 | +Antidot utilizes the Antidot Container, which is a powerful dependency injection container. |
| 11 | +It provides a way to manage and configure dependencies within your application, promoting |
| 12 | +modularity and testability. With the container, you can easily define and resolve dependencies |
| 13 | +across your application. |
| 14 | + |
| 15 | +### Middleware Stack |
| 16 | + |
| 17 | +Antidot supports a flexible middleware stack, allowing you to define and execute middleware |
| 18 | +components in a specific order. Middleware provides a convenient way to intercept and modify |
| 19 | +HTTP requests and responses, enabling functionalities such as authentication, logging, error |
| 20 | +handling, and more. Antidot makes it easy to integrate and chain multiple middleware components |
| 21 | +to process requests and generate responses. |
| 22 | + |
| 23 | +### Routing and Controllers |
| 24 | + |
| 25 | +Antidot provides a robust routing system based on the popular nikic/fast-route package. With |
| 26 | +Antidot's fluent interface, you can define routes and bind them to controllers or request |
| 27 | +handlers. This allows you to map incoming HTTP requests to specific actions in your application. |
| 28 | +Controllers or request handlers implement the `Psr\Http\Server\RequestHandlerInterface`, |
| 29 | +enabling you to handle requests and return responses in a standardized way. |
| 30 | + |
| 31 | +### Error Handling |
20 | 32 |
|
21 |
| -```bash |
22 |
| -composer create-project antidot-fw/antidot-framework-starter project-name |
23 |
| -cd project-name |
24 |
| -bin/console |
25 |
| -php -S 127.0.0.1:8000 ./public |
26 |
| -``` |
| 33 | +Antidot offers comprehensive error handling capabilities. You can configure error handlers to |
| 34 | +catch and process exceptions thrown during the execution of your application. This allows you |
| 35 | +to handle errors gracefully and provide appropriate responses to clients. Antidot supports |
| 36 | +custom error handlers, allowing you to define how different types of errors are handled based |
| 37 | +on your application's requirements. |
27 | 38 |
|
28 |
| -Or you can try ReactPHP version |
| 39 | +### Testing |
29 | 40 |
|
30 |
| -```bash |
31 |
| -composer create-project antidot-fw/reactive-starter project-name |
32 |
| -cd project-name |
33 |
| -bin/console |
34 |
| -php public/index.php # Creates server on 127.0.0.1:8000 |
35 |
| -``` |
| 41 | +Antidot emphasizes the importance of testing by providing built-in testing tools and utilities. |
| 42 | +You can write unit tests for your application's components, including middleware, controllers, |
| 43 | +and services. Antidot integrates well with popular testing frameworks like PHPUnit, allowing |
| 44 | +you to easily set up and execute tests to verify the correctness of your code. |
| 45 | + |
| 46 | +### ReactPHP Server with Synchronous API |
| 47 | + |
| 48 | +One of the standout features of Antidot is its integration with ReactPHP, a powerful event-driven, |
| 49 | +non-blocking I/O library for PHP. Antidot leverages ReactPHP to provide a high-performance, |
| 50 | +asynchronous web server. Additionally, Antidot extends ReactPHP to support a synchronous API, |
| 51 | +allowing developers to write code in a synchronous style without dealing with promises. |
| 52 | +This feature provides a familiar programming experience while taking advantage of ReactPHP's |
| 53 | +performance benefits. |
| 54 | + |
| 55 | +### And More... |
| 56 | + |
| 57 | +Antidot PHP Framework also offers a range of other features, including environment-specific |
| 58 | +configuration, PSR-7 integration, PSR-15 middleware compatibility, extensibility through service |
| 59 | +providers, and a vibrant community that actively contributes to the framework's development |
| 60 | +and improvement. |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Quick Start |
36 | 65 |
|
| 66 | +> Se the [Getting Started Guide](/framework/getting-started) |
37 | 67 |
|
38 | 68 | ## Special thanks & Sponsors
|
39 | 69 |
|
|
0 commit comments