function init() { $result = parent::init(); $this->registerContentTypes(); \Bonita\Main::additionalPath(dirname($this->getFilename())); return $result; }
/** * 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(); } }
function __construct($aMainTabs = false) { parent::init(); if (!empty($aMainTabs)) { foreach ($aMainTabs as $key => $title) { $this->items[$title] = array('title' => $title, 'counter' => false, 'sub' => array()); } } }
/** * @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]); } } }
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); } }
function _initComponents() { $component = new Component(); $component->init($this); }
/** * Constructor * * @return void */ protected function init() { parent::init(); }
/** * 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')); }
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(); }
public function init() { parent::init(); $this->content = "Hello Yii 2.0"; }
/** * @return $this */ public function init() { $this->connect(); return parent::init(); }
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(); } }
function init() { $result = parent::init(); return $result; }
<?php require_once "../component.inc.php"; Component::init("Admin"); ?>
<?php require_once "component.inc.php"; Component::init("user"); ?>
public function init() { parent::init(); }
public function init() { parent::init(); $this->_s = Yaf_Registry::get('session'); $this->_s->open(); }
<?php require_once "../component.inc.php"; Component::init("User"); ?>