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


PHP Component::init方法代码示例

本文整理汇总了PHP中Component::init方法的典型用法代码示例。如果您正苦于以下问题:PHP Component::init方法的具体用法?PHP Component::init怎么用?PHP Component::init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Component的用法示例。


在下文中一共展示了Component::init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: init

 function init()
 {
     $result = parent::init();
     $this->registerContentTypes();
     \Bonita\Main::additionalPath(dirname($this->getFilename()));
     return $result;
 }
开发者ID:sintoris,项目名称:Known,代码行数:7,代码来源:Plugin.php

示例2: init

 /**
  * Initializes the application component.
  * This method overrides the parent implementation by setting default cache key prefix.
  */
 public function init()
 {
     parent::init();
     if ($this->keyPrefix === null) {
         $this->keyPrefix = '';
         //Yaf_Application::app()->get_id();
     }
 }
开发者ID:nbaiwan,项目名称:yav,代码行数:12,代码来源:CCache.php

示例3: foreach

 function __construct($aMainTabs = false)
 {
     parent::init();
     if (!empty($aMainTabs)) {
         foreach ($aMainTabs as $key => $title) {
             $this->items[$title] = array('title' => $title, 'counter' => false, 'sub' => array());
         }
     }
 }
开发者ID:Sywooch,项目名称:dobox,代码行数:9,代码来源:menu.php

示例4: init

 /**
  * @return $this
  */
 public function init()
 {
     if (empty($this->protocol) and !empty($_SERVER['SERVER_PROTOCOL'])) {
         $this->protocol = strtolower(preg_replace('!/(.*)$!', '', $_SERVER['SERVER_PROTOCOL']));
     }
     if (empty($this->hostName) and !empty($_SERVER[strtoupper($this->protocol) . '_HOST'])) {
         $this->hostName = $_SERVER[strtoupper($this->protocol) . '_HOST'];
     }
     return parent::init();
 }
开发者ID:ukrcms,项目名称:core,代码行数:13,代码来源:Url.php

示例5: init

 /**
  * Constructor
  *
  * @return void
  */
 protected function init()
 {
     parent::init();
     if (defined('DOING_AJAX') && DOING_AJAX) {
         $action = filter_var(isset($_REQUEST['action']) ? $_REQUEST['action'] : '', FILTER_SANITIZE_STRING);
         if (method_exists($this, $action)) {
             // hook into action if it's method exists
             add_action('wp_ajax_' . $action, [&$this, $action]);
         }
     }
 }
开发者ID:N-Molham,项目名称:wp-plugins-boilerplate,代码行数:16,代码来源:Ajax_Handler.php

示例6: init

 public function init()
 {
     parent::init();
     $this->module_name = mb_strtolower(get_class($this));
     $this->module_dir_tpl = $this->module_dir . 'tpl' . DIRECTORY_SEPARATOR . LANG_DEFAULT;
     //include global language file
     include_once PATH_BASE . 'lang' . DIRECTORY_SEPARATOR . LANG_DEFAULT . '.inc.php';
     //include module language file
     if (file_exists($this->module_dir . 'lang' . DIRECTORY_SEPARATOR . LANG_DEFAULT . '.inc.php')) {
         include_once $this->module_dir . 'lang' . DIRECTORY_SEPARATOR . LANG_DEFAULT . '.inc.php';
         if (isset($lang)) {
             $this->module_lang =& $lang;
         }
         $this->errors->setLang($this->module_lang);
     }
 }
开发者ID:Sywooch,项目名称:dobox,代码行数:16,代码来源:module.php

示例7: Component

 function _initComponents()
 {
     $component = new Component();
     $component->init($this);
 }
开发者ID:venka10,项目名称:RUS,代码行数:5,代码来源:controller.php

示例8: init

 /**
  * Constructor
  *
  * @return void
  */
 protected function init()
 {
     parent::init();
 }
开发者ID:N-Molham,项目名称:wp-plugins-boilerplate,代码行数:9,代码来源:Backend.php

示例9: testLoadComponents

 /**
  * testLoadComponents method
  *
  * @access public
  * @return void
  */
 function testLoadComponents()
 {
     $Controller = new ComponentTestController();
     $Controller->components = array('RequestHandler');
     $Component = new Component();
     $Component->init($Controller);
     $this->assertTrue(is_a($Controller->RequestHandler, 'RequestHandlerComponent'));
     $Controller = new ComponentTestController();
     $Controller->plugin = 'test_plugin';
     $Controller->components = array('RequestHandler', 'TestPluginComponent');
     $Component = new Component();
     $Component->init($Controller);
     $this->assertTrue(is_a($Controller->RequestHandler, 'RequestHandlerComponent'));
     $this->assertTrue(is_a($Controller->TestPluginComponent, 'TestPluginComponentComponent'));
     $this->assertTrue(is_a($Controller->TestPluginComponent->TestPluginOtherComponent, 'TestPluginOtherComponentComponent'));
     $this->assertFalse(isset($Controller->TestPluginOtherComponent));
     $Controller = new ComponentTestController();
     $Controller->components = array('Security');
     $Component = new Component();
     $Component->init($Controller);
     $this->assertTrue(is_a($Controller->Security, 'SecurityComponent'));
     $this->assertTrue(is_a($Controller->Security->Session, 'SessionComponent'));
     $Controller = new ComponentTestController();
     $Controller->components = array('Security', 'Cookie', 'RequestHandler');
     $Component = new Component();
     $Component->init($Controller);
     $this->assertTrue(is_a($Controller->Security, 'SecurityComponent'));
     $this->assertTrue(is_a($Controller->Security->RequestHandler, 'RequestHandlerComponent'));
     $this->assertTrue(is_a($Controller->RequestHandler, 'RequestHandlerComponent'));
     $this->assertTrue(is_a($Controller->Cookie, 'CookieComponent'));
 }
开发者ID:evrard,项目名称:cakephp2x,代码行数:37,代码来源:component.test.php

示例10: init

 public function init()
 {
     parent::init();
     if ($this->autoConnect) {
         $this->setActive(true);
     }
 }
开发者ID:nbaiwan,项目名称:yav,代码行数:7,代码来源:CDbConnection.php

示例11: init

 /**
  * Initiates the form component
  * 
  * @access public
  */
 public function init()
 {
     parent::init();
     $this->errors = array();
 }
开发者ID:LovagiasParaszt,项目名称:phpscrabble,代码行数:10,代码来源:component.FormComponent.php

示例12: init

 public function init()
 {
     parent::init();
     $this->content = "Hello Yii 2.0";
 }
开发者ID:NeroJz,项目名称:admbackend,代码行数:5,代码来源:MessageComponent.php

示例13: init

 /**
  * @return $this
  */
 public function init()
 {
     $this->connect();
     return parent::init();
 }
开发者ID:ukrcms,项目名称:core,代码行数:8,代码来源:Db.php

示例14: indexFile

 public function indexFile($file_path)
 {
     $file_path = trim($file_path, '/');
     $FileInstance = new File(array('init' => false));
     if ($this->db) {
         $FileInstance->setConnection($this->db);
     }
     $FileInstance->init();
     if ($UnIndexedPage = $FileInstance->findFirstBy('path AND has_been_analyzed', $file_path, false)) {
         $ComponentInstance = new Component(array('init' => false));
         if ($this->db) {
             $ComponentInstance->setConnection($this->db);
         }
         $ComponentInstance->init();
         $ClassInstance = new Klass(array('init' => false));
         if ($this->db) {
             $ClassInstance->setConnection($this->db);
         }
         $ClassInstance->init();
         $this->log('Analyzing file ' . $UnIndexedPage->path);
         $Component = $ComponentInstance->updateComponentDetails($UnIndexedPage, $this);
         $Classes = $ClassInstance->updateClassDetails($UnIndexedPage, $Component, $this);
         if (!empty($Classes)) {
             //AkDebug::debug($Classes);
         }
         $UnIndexedPage->set('has_been_analyzed', true);
         $UnIndexedPage->save();
     }
 }
开发者ID:bermi,项目名称:akelos,代码行数:29,代码来源:source_analyzer.php

示例15: init

 function init()
 {
     $result = parent::init();
     return $result;
 }
开发者ID:sintoris,项目名称:Known,代码行数:5,代码来源:Theme.php


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