PHP Класс CampContext

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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