Пример #1
0
 function init()
 {
     $result = parent::init();
     $this->registerContentTypes();
     \Bonita\Main::additionalPath(dirname($this->getFilename()));
     return $result;
 }
Пример #2
0
 /**
  * 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();
     }
 }
Пример #3
0
 function __construct($aMainTabs = false)
 {
     parent::init();
     if (!empty($aMainTabs)) {
         foreach ($aMainTabs as $key => $title) {
             $this->items[$title] = array('title' => $title, 'counter' => false, 'sub' => array());
         }
     }
 }
Пример #4
0
 /**
  * @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();
 }
 /**
  * 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]);
         }
     }
 }
Пример #6
0
 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);
     }
 }
Пример #7
0
 function _initComponents()
 {
     $component = new Component();
     $component->init($this);
 }
Пример #8
0
 /**
  * Constructor
  *
  * @return void
  */
 protected function init()
 {
     parent::init();
 }
Пример #9
0
 /**
  * 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'));
 }
Пример #10
0
 public function init()
 {
     parent::init();
     if ($this->autoConnect) {
         $this->setActive(true);
     }
 }
 /**
  * Initiates the form component
  * 
  * @access public
  */
 public function init()
 {
     parent::init();
     $this->errors = array();
 }
Пример #12
0
 public function init()
 {
     parent::init();
     $this->content = "Hello Yii 2.0";
 }
Пример #13
0
Файл: Db.php Проект: ukrcms/core
 /**
  * @return $this
  */
 public function init()
 {
     $this->connect();
     return parent::init();
 }
Пример #14
0
 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();
     }
 }
Пример #15
0
 function init()
 {
     $result = parent::init();
     return $result;
 }
Пример #16
0
<?php

	require_once "../component.inc.php";

	Component::init("Admin");

?>
Пример #17
0
<?php

	require_once "component.inc.php";

	Component::init("user");

?>
Пример #18
0
 public function init()
 {
     parent::init();
 }
Пример #19
0
 public function init()
 {
     parent::init();
     $this->_s = Yaf_Registry::get('session');
     $this->_s->open();
 }
Пример #20
0
<?php

	require_once "../component.inc.php";

	Component::init("User");

?>