PHP Class CapMousse\ReactRestify\Server

Afficher le fichier Open project: capmousse/react-restify Class Usage Examples

Méthodes publiques

Свойство Type Description
$name string Name of the server
$version null Version of the API

Méthodes publiques

Méthode Description
__call ( string $name, array $arguments )
__construct ( null $name = null, null $version = null )
__invoke ( React\Http\Request $httpRequest, React\Http\Response $httpResponse ) Parse request from user
group ( String $prefix, Callable $callback ) : CapMousse\ReactRestify\Routing\Routes Create a new group of route
on ( String $event, Callable $callback ) Manual router event manager
setAccessControlAllowOrigin ( string $origin ) The the Access-Control-Allow-Origin header

Private Methods

Méthode Description
initEvents ( ) : void Init default event catch

Method Details

__call() public méthode

public __call ( string $name, array $arguments )
$name string method to call
$arguments array

__construct() public méthode

public __construct ( null $name = null, null $version = null )
$name null
$version null

__invoke() public méthode

Parse request from user
public __invoke ( React\Http\Request $httpRequest, React\Http\Response $httpResponse )
$httpRequest React\Http\Request
$httpResponse React\Http\Response

group() public méthode

Create a new group of route
public group ( String $prefix, Callable $callback ) : CapMousse\ReactRestify\Routing\Routes
$prefix String prefix of the routes
$callback Callable
Résultat CapMousse\ReactRestify\Routing\Routes

on() public méthode

Manual router event manager
public on ( String $event, Callable $callback )
$event String
$callback Callable

setAccessControlAllowOrigin() public méthode

The the Access-Control-Allow-Origin header
public setAccessControlAllowOrigin ( string $origin )
$origin string

Property Details

$name public_oe property

Name of the server
public string $name
Résultat string

$version public_oe property

Version of the API
public null $version
Résultat null