Recommend this page to a friend! |
Download .zip |
Info | Example | View files (62) | Download .zip | Reputation | Support forum (1) | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2021-04-15 (4 days ago) | Not yet rated by the users | Total: 29 This week: 29 | All time: 10,163 This week: 7 |
Version | License | PHP version | Categories | |||
crowphp 1.0 | MIT/X Consortium ... | 8 | Libraries, Design Patterns, PHP 8 |
Description | Author | |
This package is a framework to develop applications using micro-services. |
Fast un-opinionated minimalist web framework and server for PHP built on top of Async PHP servers (SwoolePHP and ReactPHP). CrowPHP lets you build real microservices in PHP without the use of PHP-FPM/Nginx or Apache.
$ pecl install swoole
Installation of CrowPHP via composer, the following command will install the framework and all of its dependencies with it.
composer install crowphp/crow
<?php
require 'vendor/autoload.php';
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface as RequestInterface;
use Crow\Http\Server\Factory as CrowServer;
$app = CrowServer::create(CrowServer::SWOOLE_SERVER);
$router = Crow\Router\Factory::make();
$router->get('/', function (RequestInterface $request, ResponseInterface $response) {
$response->getBody()->write('Hello World');
return $response;
});
$app->withRouter($router);
$app->listen(5005);
You may quickly test your newly built service as follows:
$ php index.php
Going to http://localhost:5005 will now display "Hello World".
For more information on how to configure your web server, see the Documentation.
To execute the test suite, you'll need to install all development dependencies.
$ git clone https://github.com/crowphp/crow
$ composer install
$ composer test
Please see CONTRIBUTING for details.
Learn more at these links: - Website
If you discover security related issues, please email yousaf@bmail.pk or use the issue tracker.
The Crow Framework is licensed under the MIT license. See License File for more information.
Files |
File | Role | Description | ||
---|---|---|---|---|
.github (1 directory) | ||||
Crow (4 directories) | ||||
examples (1 file) | ||||
Tests (1 directory) | ||||
composer.json | Data | Auxiliary data | ||
CONTRIBUTING.md | Data | Auxiliary data | ||
LICENSE.md | Lic. | License text | ||
phpcs.xml.dist | Data | Auxiliary data | ||
phpstan.neon.dist | Data | Auxiliary data | ||
phpunit.xml | Data | Auxiliary data | ||
Readme.md | Doc. | Read me | ||
SECURITY.md | Data | Auxiliary data |
Files | / | Crow |
File | Role | Description | ||
---|---|---|---|---|
Handlers (7 files) | ||||
Http (5 files, 1 directory) | ||||
Middlewares (4 files) | ||||
Router (5 files, 1 directory) |
Files | / | Crow | / | Handlers |
File | Role | Description |
---|---|---|
CrowRequestHandler.php | Class | Class source |
ErrorHandler.php | Class | Class source |
QueueRequestHandler.php | Class | Class source |
QueueRequestHandlerBuilder.php | Class | Class source |
ReactRequestHandler.php | Class | Class source |
RouteDispatchHandler.php | Class | Class source |
SwooleRequestHandler.php | Class | Class source |
Files | / | Crow | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Server (7 files, 1 directory) | ||||
DefaultHeaders.php | Class | Class source | ||
PsrToSwooleResponseBuilder.php | Class | Class source | ||
RequestFactory.php | Class | Class source | ||
ResponseBuilder.php | Class | Class source | ||
SwooleRequest.php | Class | Class source |
Files | / | Crow | / | Http | / | Server |
File | Role | Description | ||
---|---|---|---|---|
Exceptions (2 files) | ||||
BaseServer.php | Class | Class source | ||
CrowReactServer.php | Class | Class source | ||
CrowSwooleServer.php | Class | Class source | ||
Factory.php | Class | Class source | ||
ReactPHPServer.php | Class | Class source | ||
ServerInterface.php | Class | Class source | ||
SwoolePHPServer.php | Class | Class source |
Files | / | Crow | / | Http | / | Server | / | Exceptions |
File | Role | Description |
---|---|---|
InvalidEventType.php | Class | Class source |
InvalidServerType.php | Class | Class source |
Files | / | Crow | / | Middlewares |
File | Role | Description |
---|---|---|
ErrorMiddleware.php | Class | Class source |
FinalMiddleware.php | Class | Class source |
RoutingMiddleware.php | Class | Class source |
UserMiddlewaresList.php | Class | Class source |
Files | / | Crow | / | Router |
File | Role | Description | ||
---|---|---|---|---|
Exceptions (1 file) | ||||
DispatcherFactoryInterface.php | Class | Class source | ||
Factory.php | Class | Class source | ||
FastRouteDispatcher.php | Class | Class source | ||
FastRouter.php | Class | Class source | ||
RouterInterface.php | Class | Class source |
Files | / | Crow | / | Router | / | Exceptions |
File | Role | Description |
---|---|---|
RoutingLogicException.php | Class | Class source |
Files | / | Tests | / | Unit | / | Crow |
File | Role | Description | ||
---|---|---|---|---|
Handlers (6 files) | ||||
Http (5 files, 1 directory) | ||||
Middlewares (2 files) | ||||
Router (3 files) |
Files | / | Tests | / | Unit | / | Crow | / | Handlers |
File | Role | Description |
---|---|---|
ErrorHandlerTest.php | Class | Class source |
QueueRequestHandlerBuilderTest.php | Class | Class source |
QueueRequestHandlerTest.php | Class | Class source |
ReactRequestHandlerTest.php | Class | Class source |
RouteDispatchHandlerTest.php | Class | Class source |
SwooleRequestHandlerTest.php | Class | Class source |
Files | / | Tests | / | Unit | / | Crow | / | Http |
File | Role | Description | ||
---|---|---|---|---|
Server (5 files) | ||||
DefaultHeadersTest.php | Class | Class source | ||
PsrToSwooleResponseBuilderTest.php | Class | Class source | ||
RequestFactoryTest.php | Class | Class source | ||
ResponseBuilderTest.php | Class | Class source | ||
SwooleRequestTest.php | Class | Class source |
Files | / | Tests | / | Unit | / | Crow | / | Http | / | Server |
File | Role | Description |
---|---|---|
CrowReactServerTest.php | Class | Class source |
CrowSwooleServerTest.php | Class | Class source |
FactoryTest.php | Class | Class source |
ReactPHPServerTest.php | Class | Class source |
SwoolePHPServerTest.php | Class | Class source |
Files | / | Tests | / | Unit | / | Crow | / | Middlewares |
File | Role | Description |
---|---|---|
ErrorMiddlewareTest.php | Class | Class source |
RoutingMiddlewareTest.php | Class | Class source |
Files | / | Tests | / | Unit | / | Crow | / | Router |
File | Role | Description |
---|---|---|
FactoryTest.php | Class | Class source |
FastRouteDispatcherTest.php | Class | Class source |
FastRouterTest.php | Class | Class source |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
User Comments (1) | |||||
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.