Recommend this page to a friend! |
Download |
Info | Example | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not enough user ratings | Total: 106 | All time: 9,702 This week: 79 |
Version | License | PHP version | Categories | |||
crowphp 1.0.0 | MIT/X Consortium ... | 8 | Libraries, Design Patterns, PHP 8 |
Description | Author | |||
This package is a framework to develop applications using micro-services. Innovation Award
|
#!/usr/bin/env php |
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 (62) |
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 (62) | / | Crow |
File | Role | Description | ||
---|---|---|---|---|
Handlers (7 files) | ||||
Http (5 files, 1 directory) | ||||
Middlewares (4 files) | ||||
Router (5 files, 1 directory) |
Files (62) | / | 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 (62) | / | 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 (62) | / | 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 (62) | / | Crow | / | Http | / | Server | / | Exceptions |
File | Role | Description |
---|---|---|
InvalidEventType.php | Class | Class source |
InvalidServerType.php | Class | Class source |
Files (62) | / | 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 (62) | / | 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 (62) | / | Crow | / | Router | / | Exceptions |
File | Role | Description |
---|---|---|
RoutingLogicException.php | Class | Class source |
Files (62) | / | Tests | / | Unit | / | Crow |
File | Role | Description | ||
---|---|---|---|---|
Handlers (6 files) | ||||
Http (5 files, 1 directory) | ||||
Middlewares (2 files) | ||||
Router (3 files) |
Files (62) | / | 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 (62) | / | 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 (62) | / | 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 (62) | / | Tests | / | Unit | / | Crow | / | Middlewares |
File | Role | Description |
---|---|---|
ErrorMiddlewareTest.php | Class | Class source |
RoutingMiddlewareTest.php | Class | Class source |
Files (62) | / | Tests | / | Unit | / | Crow | / | Router |
File | Role | Description |
---|---|---|
FactoryTest.php | Class | Class source |
FastRouteDispatcherTest.php | Class | Class source |
FastRouterTest.php | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
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.