PHP 클래스 CampContext

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

공개 프로퍼티들

프로퍼티 타입 설명
$flash_messages array
$form_contact Application_Form_Contact
$login_action array dummy login action

공개 메소드들

메소드 설명
TranslateProperty ( string $p_property ) : string Processes a property name; returns a valid property name.
__construct ( ) Class constructor
__get ( string $p_element ) : mix Overloaded method call to give access to context properties.
__set ( string $p_element, string $p_value ) : mix Overloade method call to set the context properties.
allPropertiesNames ( ) : array Returns the list of all properties
current_list_id ( ) : integer Returns the corresponding id for the current list
getCurrentListName ( ) : string Returns the list name of the current list.
getListName ( $list ) fn setCurrentList
getSystemPreference ( string $preferenceName, $default = null ) : mixed Check system preferences in smarty
getUserCount ( ) : integer Get active user count
has_object ( string $p_object ) Returns true if the given object exists.
has_property ( string $p_property ) Returns true if the given property exists.
isPluginEnabled ( string $pluginName ) : boolean Check if plugin is installed and enabled
list_id_prefix ( $p_className )
next_list_id ( string $p_className ) Returns the corresponding id for a new list of the given type
next_list_start ( string $p_className ) Returns the corresponding list start index for a new list of the given type
resetCurrentList ( ) : void Resets the current list.
restoreContext ( ) Restores the global context.
saveCurrentContext ( array $p_propertiesList = [] ) : void Saves the current context objects.
setCurrentList ( object &$p_list, array $p_savePropertiesList = [] ) : void Sets the current list.
setPreviewMode ( $status = true ) Set preview mode for context.

보호된 메소드들

메소드 설명
ObjectType ( string $p_property ) Returns the name corresponding to the given property; null if the property is not an object.
getArticle ( ) : MetaIssue Returns the article defined in the current context; if it wasn't defined it initializes the article by an empty object.
getIssue ( ) : MetaIssue Returns the issue defined in the current context; if it wasn't defined it initializes the issue by an empty object.
getLanguage ( ) : MetaIssue Returns the language defined in the current context; if it wasn't defined it initializes the language by an empty object.
getPublication ( ) : MetaPublication Returns the publication defined in the current context; if it wasn't defined it initializes the publication by an empty object.
getSection ( ) : MetaIssue Returns the section defined in the current context; if it wasn't defined it initializes the section by an empty object.
trigger_invalid_object_error ( string $p_object ) Triggers an invalid object error.
trigger_invalid_property_error ( string $p_property, $p_smarty = null ) Triggers an invalid property error.
trigger_invalid_register_error ( $p_message )

비공개 메소드들

메소드 설명
GetListObjectName ( string $p_listClassName ) : string Returns the object name from the list class name.
RestoreProperties ( ) Restores the last list of properties from the stack
SaveProperties ( array $p_propertiesList ) : void Saves a given list of properties
createObject ( string $p_objectType ) : object Creates an object of the given type. Returns the created object.
registerListObject ( array $listObject ) Register an list object
registerObjectType ( array $p_objectType ) Register an new object type
setArticleHandler ( MetaArticle $p_oldArticle, MetaArticle $p_newArticle ) Handler for the article change event.
setCommentHandler ( MetaComment $p_oldComment, MetaComment $p_newComment ) Handler for the comment change event.
setIssueHandler ( MetaIssue $p_oldIssue, MetaIssue $p_newIssue ) Handler for the issue change event.
setLanguageHandler ( MetaLanguage $p_oldLanguage, MetaLanguage $p_newLanguage ) Handler for the language change event.
setPublicationHandler ( MetaPublication $p_oldPublication, MetaPublication $p_newPublication ) Handler for the publication change event.
setSectionHandler ( MetaSection $p_oldSection, MetaSection $p_newSection ) Handler for the section change event.
setSubtitleHandler ( MetaSubtitle $p_oldSubtitle, MetaSubtitle $p_newSubtitle )
setTopicHandler ( MetaTopic $p_oldTopic, MetaTopic $p_newTopic )

메소드 상세

ObjectType() 보호된 정적인 메소드

Returns the name corresponding to the given property; null if the property is not an object.
protected static ObjectType ( string $p_property )
$p_property string

TranslateProperty() 공개 정적인 메소드

Processes a property name; returns a valid property name.
public static TranslateProperty ( string $p_property ) : string
$p_property string
리턴 string

__construct() 최종 공개 메소드

Class constructor
final public __construct ( )

__get() 최종 공개 메소드

Overloaded method call to give access to context properties.
final public __get ( string $p_element ) : mix
$p_element string - the property name
리턴 mix - the property value

__set() 최종 공개 메소드

Overloade method call to set the context properties.
final public __set ( string $p_element, string $p_value ) : mix
$p_element string - property name
$p_value string - value of the property
리턴 mix - the property value

allPropertiesNames() 공개 메소드

Returns the list of all properties
public allPropertiesNames ( ) : array
리턴 array

current_list_id() 공개 메소드

Returns the corresponding id for the current list
public current_list_id ( ) : integer
리턴 integer - the current list identifier

getArticle() 최종 보호된 메소드

This method was defined because it's faster than using the magic method __get(). *
final protected getArticle ( ) : MetaIssue
리턴 MetaIssue

getCurrentListName() 공개 메소드

Returns the list name of the current list.
public getCurrentListName ( ) : string
리턴 string The name of the list

getIssue() 최종 보호된 메소드

This method was defined because it's faster than using the magic method __get().
final protected getIssue ( ) : MetaIssue
리턴 MetaIssue

getLanguage() 최종 보호된 메소드

This method was defined because it's faster than using the magic method __get().
final protected getLanguage ( ) : MetaIssue
리턴 MetaIssue

getListName() 공개 메소드

fn setCurrentList
public getListName ( $list )

getPublication() 최종 보호된 메소드

This method was defined because it's faster than using the magic method __get().
final protected getPublication ( ) : MetaPublication
리턴 MetaPublication

getSection() 최종 보호된 메소드

This method was defined because it's faster than using the magic method __get().
final protected getSection ( ) : MetaIssue
리턴 MetaIssue

getSystemPreference() 공개 메소드

Check system preferences in smarty
public getSystemPreference ( string $preferenceName, $default = null ) : mixed
$preferenceName string Systempreferences machine name
리턴 mixed

getUserCount() 공개 메소드

Get active user count
public getUserCount ( ) : integer
리턴 integer

has_object() 공개 메소드

Returns true if the given object exists.
public has_object ( string $p_object )
$p_object string

has_property() 공개 메소드

Returns true if the given property exists.
public has_property ( string $p_property )
$p_property string

isPluginEnabled() 공개 메소드

Check if plugin is installed and enabled
public isPluginEnabled ( string $pluginName ) : boolean
$pluginName string Plugin name ex. "vendor/plugin-name"
리턴 boolean

list_id_prefix() 공개 메소드

public list_id_prefix ( $p_className )

next_list_id() 공개 메소드

Returns the corresponding id for a new list of the given type
public next_list_id ( string $p_className )
$p_className string

next_list_start() 공개 메소드

Returns the corresponding list start index for a new list of the given type
public next_list_start ( string $p_className )
$p_className string

resetCurrentList() 공개 메소드

Resets the current list.
public resetCurrentList ( ) : void
리턴 void

restoreContext() 공개 메소드

Restores the global context.
public restoreContext ( )

saveCurrentContext() 공개 메소드

Saves the current context objects.
public saveCurrentContext ( array $p_propertiesList = [] ) : void
$p_propertiesList array
리턴 void

setCurrentList() 공개 메소드

Sets the current list.
public setCurrentList ( object &$p_list, array $p_savePropertiesList = [] ) : void
$p_list object
$p_savePropertiesList array
리턴 void

setPreviewMode() 공개 메소드

Setting preview mode allows rendering not published issues and articles.
public setPreviewMode ( $status = true )

trigger_invalid_object_error() 최종 보호된 메소드

Triggers an invalid object error.
final protected trigger_invalid_object_error ( string $p_object )
$p_object string - object name

trigger_invalid_property_error() 최종 보호된 메소드

Triggers an invalid property error.
final protected trigger_invalid_property_error ( string $p_property, $p_smarty = null )
$p_property string - property name

trigger_invalid_register_error() 최종 보호된 메소드

final protected trigger_invalid_register_error ( $p_message )

프로퍼티 상세

$flash_messages 공개적으로 프로퍼티

public array $flash_messages
리턴 array

$form_contact 공개적으로 프로퍼티

public Application_Form_Contact $form_contact
리턴 Application_Form_Contact

$login_action 공개적으로 프로퍼티

dummy login action
public array $login_action
리턴 array