PHP 클래스 lithium\console\command\Route

상속: extends lithium\console\Command
파일 보기 프로젝트 열기: unionofrad/lithium 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$env string For example: sh li3 route --env=production li3 route show /foo --env=test

공개 메소드들

메소드 설명
__construct ( array $config = [] ) Constructor. Load the routes file and set the environment.
all ( $scope = true ) : void Lists all connected routes to the router. This is a convenience alias for the show() method.
run ( ) : void Lists all connected routes to the router. See the all() method for details and examples.
show ( ) : void Returns the corresponding params for a given URL and an optional request method.

보호된 메소드들

메소드 설명
_init ( )

메소드 상세

__construct() 공개 메소드

Constructor. Load the routes file and set the environment.
public __construct ( array $config = [] )
$config array The default configuration, wherein the absolute path to the routes file to load may be specified, using the `'routes'` key.

_init() 보호된 메소드

protected _init ( )

all() 공개 메소드

Example: sh li3 route li3 route all Will return an output similar to: Template Params -------- ------ {"controller":"pages","action":"view"} pages/{:args} {"controller":"pages","action":"view"} {:slug:[\w\-]+} {"controller":"posts","action":"show"} {:controller}/{:action}/{:args} {"action":"index"}
public all ( $scope = true ) : void
리턴 void

run() 공개 메소드

Lists all connected routes to the router. See the all() method for details and examples.
public run ( ) : void
리턴 void

show() 공개 메소드

Examples: 1: li3 route show /foo 2: li3 route show post /foo/bar/1 3: li3 route show /test 4: li3 route show /test --env=production Will return outputs similar to: 1: {"controller":"foo","action":"index" } 2: {"controller":"foo","action":"bar","args":["1"]} 3: {"controller":"lithium\\test\\Controller","action":"index"} 4: {"controller":"test","action":"index"}
public show ( ) : void
리턴 void

프로퍼티 상세

$env 공개적으로 프로퍼티

For example: sh li3 route --env=production li3 route show /foo --env=test
public string $env
리턴 string