Skip to content

Commit 956900b

Browse files
committed
Update docs to v2
1 parent f7d2ee9 commit 956900b

12 files changed

+1018
-976
lines changed

docs/README.md

Lines changed: 56 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,69 @@
11
# Antidot Framework
22

3-
A PHP full featured micro-framework designed to allow you to write 100% framework agnostic code.
4-
53
## Key Features
64

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:
177

8+
### Dependency Injection Container
189

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
2032

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.
2738

28-
Or you can try ReactPHP version
39+
### Testing
2940

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
3665

66+
> Se the [Getting Started Guide](/framework/getting-started)
3767
3868
## Special thanks & Sponsors
3969

docs/framework/_sidebar.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,9 @@
22
* **Docs**
33
* [Getting Started](/framework/getting-started.md "Getting started guide for Antidot Framework")
44
* [Running Application](/framework/running-application.md "Running guide for Antidot Framework")
5-
* [Routing](/framework/routing.md)
65
* [Templating](/framework/templating.md)
76
* [Persistence Layer](/framework/persitence.md)
87
* [Dependency Injection](/framework/dependency-injection.md)
9-
* [Logger](/framework/logger.md)
108
* [Event System](/framework/event-system.md)
119
* [Queues](/framework/queues.md)
1210
* [Console Line Tool](/framework/console-line-tool.md)

docs/framework/console-line-tool.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -144,56 +144,6 @@ final class SomeCommand extends Command
144144

145145
## Config
146146

147-
<!-- tabs:start -->
148-
149-
### ** Symfony style yaml **
150-
151-
````yaml
152-
# config/autoload/dependencies.{prod,local,dev}.yaml
153-
services:
154-
App\Application\EventListener\SomeCommand:
155-
tags:
156-
- { name: 'console.command', command: 'some:command:name' }
157-
````
158-
159-
### ** Zend style yaml **
160-
161-
````yaml
162-
# config/autoload/dependencies.{prod,local,dev}.yaml
163-
console:
164-
commands:
165-
'some:command:name': App\Application\EventListener\SomeCommand
166-
dependencies:
167-
invokables:
168-
App\Application\EventListener\SomeCommand: App\Application\EventListener\SomeCommand
169-
170-
````
171-
172-
### ** Symfony style php **
173-
174-
````php
175-
<?php
176-
// config/autoload/dependencies.{prod,dev,local}.php
177-
178-
declare(strict_types=1);
179-
180-
return [
181-
'services' => [
182-
App\Application\EventListener\SomeCommand::class => [
183-
'class' => App\Application\EventListener\SomeCommand::class,
184-
'tags' => [
185-
[
186-
'name' => 'console.command',
187-
'command' => App\Application\EventListener\SomeCommand::NAME
188-
]
189-
]
190-
]
191-
]
192-
];
193-
````
194-
195-
### ** Zend style php **
196-
197147
````php
198148
<?php
199149
// config/autoload/dependencies.{prod,dev,local}.php
@@ -215,5 +165,3 @@ return [
215165
]
216166
];
217167
````
218-
219-
<!-- tabs:end -->

0 commit comments

Comments
 (0)