PHP 클래스 CampRequest

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

공개 메소드들

메소드 설명
GetInput ( string $p_reqMethod = 'default' ) : array Returns the whole parameters array for the given input method.
GetMethod ( ) : string Returns the method used to read the input data: GET, POST etc.
GetURL ( ) : string Gets the current URL.
GetVar ( string $p_varName, mixed $p_defaultValue = null, string $p_reqMethod = 'default', string $p_dataType = null ) : mixed Gets a var from the input.
SetVar ( string $p_varName, mixed $p_varValue = null, string $p_reqMethod = 'default', boolean $p_overwrite = true ) Sets the value to the given variable.

비공개 메소드들

메소드 설명
InitInput ( string &$p_reqMethod ) Initializes the input parameters array
TranslateMethod ( &$p_reqMethod ) : string Returns a valid input method name

메소드 상세

GetInput() 공개 정적인 메소드

Returns the whole parameters array for the given input method.
public static GetInput ( string $p_reqMethod = 'default' ) : array
$p_reqMethod string
리턴 array

GetMethod() 공개 정적인 메소드

Returns the method used to read the input data: GET, POST etc.
public static GetMethod ( ) : string
리턴 string

GetURL() 공개 정적인 메소드

Gets the current URL.
public static GetURL ( ) : string
리턴 string The current URL

GetVar() 공개 정적인 메소드

Allows to fetch the variable value requested from the appropiate input method.
public static GetVar ( string $p_varName, mixed $p_defaultValue = null, string $p_reqMethod = 'default', string $p_dataType = null ) : mixed
$p_varName string The name of the variable to be fetched.
$p_defaultValue mixed The default value to be fetched for the given variable
$p_reqMethod string The requested input method, default is REQUEST
$p_dataType string TODO to be implemented
리턴 mixed $var The value of the requested variable

SetVar() 공개 정적인 메소드

Sets the value to the given variable.
public static SetVar ( string $p_varName, mixed $p_varValue = null, string $p_reqMethod = 'default', boolean $p_overwrite = true )
$p_varName string The name of the variable to be set
$p_varValue mixed The variable value to be assigned
$p_reqMethod string The input method
$p_overwrite boolean Whether overwrite the current value of the variable or not