statflo / php-http
HTTP package for statflo php projects
Installs: 9 385
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 22
Forks: 0
Open Issues: 0
Requires
- silex/silex: >=1.3
- statflo/php-di: >=1.2 <2.0
README
installation
composer.json
{ "require": { /* ... */ "statflo/php-http": "dev-master", } }
Usage
web/index.php
<?php use Statflo\HTTP\Main; //$app = Silex\Application; Main::run($app ?: null, [ 'debug' => (bool) getenv('PHP_APP_DEBUG'), 'session' => $_SESSION, 'config_path' => dirname(__FILE__) . "/../config", 'parameters' => [ ], 'controllers' => [ "/api/accounts" => [ ['method' => 'get', 'class' => Statflo\Controller\Crm\Accounts::class, 'id' => 'statflo.controller.crm.accounts:findAll'], ], "/api/accounts/merge" => [ ['method' => 'post', 'class' => Statflo\Controller\Crm\Accounts::class, 'id' => 'statflo.controller.crm.accounts:merge'], ], ] ]);