PHP 클래스 Zaphpa_Router, zaphpa

파일 보기 프로젝트 열기: zaphpa/zaphpa 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$middleware

보호된 프로퍼티들

프로퍼티 타입 설명
$methods Allowed HTTP Methods. Restricted to only common ones, for security reasons. *
$routes

공개 메소드들

메소드 설명
addRoute ( $params ) Add a new route to the configured list of routes
attach ( ) Add a new middleware to the list of middlewares
getRequestMethod ( ) Get lower-cased representation of current HTTP Request method
route ( $uri = null )

보호된 메소드들

메소드 설명
invoke_callback ( $callback, $params ) Main reason this is a separate function is: in case library users want to change invokation logic, without having to copy/paste rest of the logic in the route() function.
invoke_options ( )

비공개 메소드들

메소드 설명
getRoutes ( $all = false ) Please note this method is performance-optimized to only return routes for current type of HTTP method

메소드 상세

addRoute() 공개 메소드

Add a new route to the configured list of routes
public addRoute ( $params )

attach() 공개 메소드

Add a new middleware to the list of middlewares
public attach ( )

getRequestMethod() 공개 정적인 메소드

Get lower-cased representation of current HTTP Request method
public static getRequestMethod ( )

invoke_callback() 보호된 메소드

Main reason this is a separate function is: in case library users want to change invokation logic, without having to copy/paste rest of the logic in the route() function.
protected invoke_callback ( $callback, $params )

invoke_options() 보호된 메소드

protected invoke_options ( )

route() 공개 메소드

public route ( $uri = null )

프로퍼티 상세

$methods 보호되어 있는 정적으로 프로퍼티

Allowed HTTP Methods. Restricted to only common ones, for security reasons. *
protected static $methods

$middleware 공개적으로 정적으로 프로퍼티

public static $middleware

$routes 보호되어 있는 프로퍼티

protected $routes