當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。