PHP 클래스 flight\net\Route

파일 보기 프로젝트 열기: mikecao/flight

공개 프로퍼티들

프로퍼티 타입 설명
$callback Callback function
$methods HTTP methods
$params Route parameters
$pass Pass self in callback parameters
$pattern URL pattern
$regex Matching regular expression
$splat URL splat content

공개 메소드들

메소드 설명
__construct ( string $pattern, mixed $callback, array $methods, boolean $pass ) Constructor.
matchMethod ( string $method ) : boolean Checks if an HTTP method matches the route methods.
matchUrl ( string $url, boolean $case_sensitive = false ) : boolean Checks if a URL matches the route pattern. Also parses named parameters in the URL.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( string $pattern, mixed $callback, array $methods, boolean $pass )
$pattern string URL pattern
$callback mixed Callback function
$methods array HTTP methods
$pass boolean Pass self in callback parameters

matchMethod() 공개 메소드

Checks if an HTTP method matches the route methods.
public matchMethod ( string $method ) : boolean
$method string HTTP method
리턴 boolean Match status

matchUrl() 공개 메소드

Checks if a URL matches the route pattern. Also parses named parameters in the URL.
public matchUrl ( string $url, boolean $case_sensitive = false ) : boolean
$url string Requested URL
$case_sensitive boolean Case sensitive matching
리턴 boolean Match status

프로퍼티 상세

$callback 공개적으로 프로퍼티

Callback function
public $callback

$methods 공개적으로 프로퍼티

HTTP methods
public $methods

$params 공개적으로 프로퍼티

Route parameters
public $params

$pass 공개적으로 프로퍼티

Pass self in callback parameters
public $pass

$pattern 공개적으로 프로퍼티

URL pattern
public $pattern

$regex 공개적으로 프로퍼티

Matching regular expression
public $regex

$splat 공개적으로 프로퍼티

URL splat content
public $splat