PHP 클래스 lithium\console\Request

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

공개 프로퍼티들

프로퍼티 타입 설명
$argv array The raw data passed from the command line
$input resource Input (STDIN).
$params array Parameters parsed from arguments.

보호된 프로퍼티들

프로퍼티 타입 설명
$_autoConfig array Auto configuration
$_env array Enviroment variables.
$_locale string Holds the value of the current locale, set through the locale() method.

공개 메소드들

메소드 설명
__construct ( array $config = [] ) : void Constructor.
__destruct ( ) : void Destructor. Closes input.
__get ( string $name ) : mixed Allows request parameters to be accessed as object properties, i.e. $this->request->action instead of $this->request->params['action'].
__isset ( $name )
args ( integer $key ) : mixed Get the value of a command line argument at a given key
env ( string $key = null ) : mixed Get environment variables.
input ( ) : string Reads a line from input.
locale ( string $locale = null ) : Returns Sets or returns the current locale string. For more information, see "Globalization" in the manual.
shift ( integer $num = 1 ) : self Moves params up a level. Sets command to action, action to passed[0], and so on.

보호된 메소드들

메소드 설명
_init ( ) : void Initialize request object, pulling request data from superglobals.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $config = [] ) : void
$config array Available configuration options are: - `'args'` _array_ - `'input'` _resource|null_
리턴 void

__destruct() 공개 메소드

Destructor. Closes input.
public __destruct ( ) : void
리턴 void

__get() 공개 메소드

Allows request parameters to be accessed as object properties, i.e. $this->request->action instead of $this->request->params['action'].
또한 보기: lithium\action\Request::$params
public __get ( string $name ) : mixed
$name string The property name/parameter key to return.
리턴 mixed Returns the value of `$params[$name]` if it is set, otherwise returns null.

__isset() 공개 메소드

public __isset ( $name )

_init() 보호된 메소드

Defines an artificial 'PLATFORM' environment variable as 'CLI' to allow checking for the SAPI in a normalized way. This is also for establishing consistency with this class' sister classes.
또한 보기: lithium\action\Request::_init()
protected _init ( ) : void
리턴 void

args() 공개 메소드

Get the value of a command line argument at a given key
public args ( integer $key ) : mixed
$key integer
리턴 mixed returns null if key does not exist or the value of the key in the args array

env() 공개 메소드

Get environment variables.
public env ( string $key = null ) : mixed
$key string
리턴 mixed Returns the environment key related to the `$key` argument. If `$key` is equal to null the result will be the entire environment array. If `$key` is set but not available, `null` will be returned.

input() 공개 메소드

Reads a line from input.
public input ( ) : string
리턴 string

locale() 공개 메소드

Sets or returns the current locale string. For more information, see "Globalization" in the manual.
public locale ( string $locale = null ) : Returns
$locale string An optional locale string like `'en'`, `'en_US'` or `'de_DE'`. If specified, will overwrite the existing locale.
리턴 Returns the currently set locale string.

shift() 공개 메소드

Moves params up a level. Sets command to action, action to passed[0], and so on.
public shift ( integer $num = 1 ) : self
$num integer how many times to shift
리턴 self

프로퍼티 상세

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

Auto configuration
protected array $_autoConfig
리턴 array

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

Enviroment variables.
protected array $_env
리턴 array

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

Holds the value of the current locale, set through the locale() method.
protected string $_locale
리턴 string

$argv 공개적으로 프로퍼티

The raw data passed from the command line
public array $argv
리턴 array

$input 공개적으로 프로퍼티

Input (STDIN).
public resource $input
리턴 resource

$params 공개적으로 프로퍼티

Parameters parsed from arguments.
또한 보기: lithium\console\Router
public array $params
리턴 array