本文整理汇总了PHP中Extension::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Extension::init方法的具体用法?PHP Extension::init怎么用?PHP Extension::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Extension
的用法示例。
在下文中一共展示了Extension::init方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addExtension
/**
* @param array|string $synonyms
* @param Extension $extension
*/
public function addExtension($synonyms, Extension $extension)
{
if (!is_array($synonyms)) {
$synonyms = array($synonyms);
}
foreach ($synonyms as $synonym) {
$extension->init($this);
$this->extensions[$synonym] = $extension;
}
}
示例2: init
public function init()
{
parent::init();
if ($message = Session::get('Status')) {
$this->owner->StatusMessage = DBField::create_field('HTMLText', $message['message']);
$this->owner->StatusType = isset($message['type']) ? $message['type'] : 'success';
Session::clear('Status');
} else {
$messages = Session::get_all();
if ($messages && isset($messages['FormInfo'])) {
foreach ($messages['FormInfo'] as $name => $message) {
if (isset($message['formError'])) {
$this->owner->StatusMessage = DBField::create_field('HTMLText', $message['formError']['message']);
$this->owner->StatusType = isset($message['formError']['type']) ? $message['formError']['type'] : 'success';
}
}
Session::clear('FormInfo');
}
}
if ($this->owner->StatusMessage) {
$this->owner->StatusMessage = html_entity_decode($this->owner->StatusMessage);
}
}
示例3: __construct
protected function __construct()
{
self::$Configuration = new Configuration();
DateTimeObj::setDefaultTimezone(self::Configuration()->core()->region->timezone);
self::$_lang = self::Configuration()->core()->symphony->lang ? self::Configuration()->core()->symphony->lang : 'en';
define_safe('__SYM_DATE_FORMAT__', self::Configuration()->core()->region->{'date-format'});
define_safe('__SYM_TIME_FORMAT__', self::Configuration()->core()->region->{'time-format'});
define_safe('__SYM_DATETIME_FORMAT__', sprintf('%s %s', __SYM_DATE_FORMAT__, __SYM_TIME_FORMAT__));
define_safe('ADMIN_URL', sprintf('%s/%s', URL, trim(self::Configuration()->core()->symphony->{'administration-path'}, '/')));
$this->initialiseLog();
GenericExceptionHandler::initialise();
GenericErrorHandler::initialise(self::$Log);
$this->initialiseCookie();
$this->initialiseDatabase();
Extension::init();
Cache::setDriver(self::Configuration()->core()->{'cache-driver'});
Lang::loadAll(true);
}