PHP 클래스 MetaAction

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

보호된 프로퍼티들

프로퍼티 타입 설명
$m_defined boolean True if an action was set up; this member is set to false by the base class. The specialized class must set it to true.
$m_error PEAR_Error Stores the error data
$m_name string Stores the action type name
$m_properties array Action properties

공개 메소드들

메소드 설명
CreateAction ( array $p_input ) : MetaAction Factory method; creates an object specialized from MetaAction based on the given input.
DefaultAction ( )
DeleteActionsFromCache ( )
ReadAvailableActions ( ) : array Searches for classes that process actions. Returns an array of action names.
TranslateProperty ( string $p_property ) : string Converts the property name to the standard way of naming properties.
ValidateInput ( array $p_input, string $p_fieldName, integer $p_minSize = null, mixed &$p_error, string $p_errorMessage, mixed $p_errorCode ) : boolean Returns true and sets the error to null if the input field was defined and it's size respected the minimum size constraint. Returns false and initializes the error to a pear error object with the given error message and code if the input field was not defined or did not respect the minimum size constraint. The minimum size constraint may be null.
__construct ( $p_name = 'default' ) Base initializations
__get ( string $p_property ) : mixed Returns the value of the given property; throws InvalidPropertyHandlerException if the property didn't exist.
__set ( string $p_property, mixed $p_value ) Throws InvalidFunctionException; action properties can not be modified.
__unset ( string $p_property ) Throws InvalidFunctionException; action properties can not be modified.
defined ( ) : boolean Returns true if an action was set up.
takeAction ( CampContext &$p_context ) : boolean Performs the action; returns true on success, false on error.

보호된 메소드들

메소드 설명
getError ( ) : mixed Returns the error code of the action. Returns 0 on success, PEAR_Error object on error.
trigger_invalid_property_error ( string $p_property, mixed $p_smarty = null ) Registers an error message in the CampTemplate singleton object.

비공개 메소드들

메소드 설명
FetchActionsFromCache ( )
StoreActionsInCache ( )

메소드 상세

CreateAction() 공개 정적인 메소드

Factory method; creates an object specialized from MetaAction based on the given input.
public static CreateAction ( array $p_input ) : MetaAction
$p_input array
리턴 MetaAction

DefaultAction() 공개 정적인 메소드

public static DefaultAction ( )

DeleteActionsFromCache() 공개 정적인 메소드

public static DeleteActionsFromCache ( )

ReadAvailableActions() 공개 정적인 메소드

Searches for classes that process actions. Returns an array of action names.
public static ReadAvailableActions ( ) : array
리턴 array

TranslateProperty() 공개 정적인 메소드

Converts the property name to the standard way of naming properties.
public static TranslateProperty ( string $p_property ) : string
$p_property string
리턴 string

ValidateInput() 공개 정적인 메소드

Returns true and sets the error to null if the input field was defined and it's size respected the minimum size constraint. Returns false and initializes the error to a pear error object with the given error message and code if the input field was not defined or did not respect the minimum size constraint. The minimum size constraint may be null.
public static ValidateInput ( array $p_input, string $p_fieldName, integer $p_minSize = null, mixed &$p_error, string $p_errorMessage, mixed $p_errorCode ) : boolean
$p_input array
$p_fieldName string
$p_minSize integer
$p_error mixed
$p_errorMessage string
$p_errorCode mixed
리턴 boolean

__construct() 공개 메소드

Base initializations
public __construct ( $p_name = 'default' )

__get() 공개 메소드

Returns the value of the given property; throws InvalidPropertyHandlerException if the property didn't exist.
public __get ( string $p_property ) : mixed
$p_property string
리턴 mixed

__set() 최종 공개 메소드

Throws InvalidFunctionException; action properties can not be modified.
final public __set ( string $p_property, mixed $p_value )
$p_property string
$p_value mixed

__unset() 최종 공개 메소드

Throws InvalidFunctionException; action properties can not be modified.
final public __unset ( string $p_property )
$p_property string

defined() 최종 공개 메소드

Returns true if an action was set up.
final public defined ( ) : boolean
리턴 boolean

getError() 보호된 메소드

Returns the error code of the action. Returns 0 on success, PEAR_Error object on error.
protected getError ( ) : mixed
리턴 mixed

takeAction() 공개 메소드

Performs the action; returns true on success, false on error.
public takeAction ( CampContext &$p_context ) : boolean
$p_context CampContext - the current context object
리턴 boolean

trigger_invalid_property_error() 보호된 메소드

Registers an error message in the CampTemplate singleton object.
protected trigger_invalid_property_error ( string $p_property, mixed $p_smarty = null )
$p_property string
$p_smarty mixed

프로퍼티 상세

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

True if an action was set up; this member is set to false by the base class. The specialized class must set it to true.
protected bool $m_defined
리턴 boolean

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

Stores the error data
protected PEAR_Error $m_error
리턴 PEAR_Error

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

Stores the action type name
protected string $m_name
리턴 string

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

Action properties
protected array $m_properties
리턴 array