PHP Интерфейс Kraken\Network\Http\Component\Router\HttpRouterInterface

Наследование: extends Kraken\Network\NetworkComponentInterface
Показать файл Открыть проект Примеры использования интерфейса

Открытые методы

Метод Описание
addRoute ( string $path, Kraken\Network\NetworkComponentInterface $component ) : Kraken\Network\Http\Component\Router\HttpRouterInterface Add an endpoint/application to the server.
allowOrigin ( string $address ) : Kraken\Network\Http\Component\Router\HttpRouterInterface Add an origin to the whitelist that will be allowed to connect to your application.
disallowOrigin ( string $address ) : Kraken\Network\Http\Component\Router\HttpRouterInterface Remove an origin so it will not be able access your routes.
existsRoute ( string $path ) : boolean Check if there exists any endpoint/application to the server on given route.
getAllowedOrigins ( ) : string[] Get an array of all the addresses allowed.
isOriginAllowed ( string $address ) : boolean Check if given $address is allowed or not.
removeRoute ( string $path ) : Kraken\Network\Http\Component\Router\HttpRouterInterface Remote endpoint/application from the server.

Описание методов

addRoute() публичный Метод

Add an endpoint/application to the server.
public addRoute ( string $path, Kraken\Network\NetworkComponentInterface $component ) : Kraken\Network\Http\Component\Router\HttpRouterInterface
$path string
$component Kraken\Network\NetworkComponentInterface
Результат Kraken\Network\Http\Component\Router\HttpRouterInterface

allowOrigin() публичный Метод

Add an origin to the whitelist that will be allowed to connect to your application.
public allowOrigin ( string $address ) : Kraken\Network\Http\Component\Router\HttpRouterInterface
$address string
Результат Kraken\Network\Http\Component\Router\HttpRouterInterface

disallowOrigin() публичный Метод

Remove an origin so it will not be able access your routes.
public disallowOrigin ( string $address ) : Kraken\Network\Http\Component\Router\HttpRouterInterface
$address string
Результат Kraken\Network\Http\Component\Router\HttpRouterInterface

existsRoute() публичный Метод

Check if there exists any endpoint/application to the server on given route.
public existsRoute ( string $path ) : boolean
$path string
Результат boolean

getAllowedOrigins() публичный Метод

Get an array of all the addresses allowed.
public getAllowedOrigins ( ) : string[]
Результат string[]

isOriginAllowed() публичный Метод

Check if given $address is allowed or not.
public isOriginAllowed ( string $address ) : boolean
$address string
Результат boolean

removeRoute() публичный Метод

Remote endpoint/application from the server.
public removeRoute ( string $path ) : Kraken\Network\Http\Component\Router\HttpRouterInterface
$path string
Результат Kraken\Network\Http\Component\Router\HttpRouterInterface