当前位置: 首页>>代码示例>>PHP>>正文


PHP Extension::init方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:enlitepro,项目名称:russell-interpreter,代码行数:14,代码来源:Interpreter.php

示例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);
     }
 }
开发者ID:jkRoberts,项目名称:feedback-module,代码行数:23,代码来源:FeedbackModulePageExtension.php

示例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);
 }
开发者ID:pointybeard,项目名称:symphony-3,代码行数:18,代码来源:class.symphony.php


注:本文中的Extension::init方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。