Initializes the Shell
acts as constructor for subclasses
allows configuration of tasks prior to shell execution

@return void
@link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::initialize
497087
public function initialize() {
		Configure::write('Cache.disable', true);
		$this->_initUiLang();
		parent::initialize();

		$this->InstallerCompleted = ClassRegistry::init('InstallerCompleted', true);
		if ($this->InstallerCompleted === false) {
			$this->InstallerCompleted = ClassRegistry::init('CakeInstaller.InstallerCompleted');
		}

		$this->progress = $this->helper('Progress');
		$this->state = $this->helper('CakeInstaller.State');
		$this->waiting = $this->helper('CakeInstaller.Waiting');
	}
1722
protected function initConsole()
    {
        $consoles = $this->setConsoles();
        foreach ($consoles as $console) {

            if ($console[0] == $this->consoleArguments[0]) {
                Console::add($console[1], $this->consoleArguments);
            }
        }

        Console::dispatch();
    }
319499
public function init()
    {
        parent::init();
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        if (!$this->chartVariable) {
            $this->chartVariable = 'highchart_'.$this->options['id'];
        }
        $this->_renderTo = ArrayHelper::getValue($this->clientOptions, 'chart.renderTo');
    }
357411
public function init()
    {
        // TODO: remove this when deprecated $replicators property is removed
        if ($this->replication_ids === null && $this->replicators !== null) {
            $this->replication_ids = array_keys($this->replicators);
        }

        if ($this->replication_ids === null) {
            $this->replication_ids = array(0);
        }

        // Remove children, these are now the prototype widgets
        foreach ($this->children as $child_widget) {
            $this->prototype_widgets[] = $this->remove($child_widget);
        }

        foreach ($this->replication_ids as $id) {
            $this->addReplication($id);
        }

        parent::init();
    }
934264
public function init()
    {
        parent::init();
        $this->setIsAdmin(in_array($this->name, $this->admins));
    }
548511
private function ensureInitialized()
    {
        if (null !== $this->initialData) {
            $this->buildProcessors();
            $this->buildGroups();
            $this->initialData = null;
        }
    }
625322
protected function initialize()
    {
        if ($this->initialized === true) {
            return;
        }
        $this->initialized = true;
        $this->buildFullConfiguration();
        $this->applyPostprocessing();
    }
1280586
private static function init()
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$tagsData = $baseClass->Html->Tags;
        }
    }
980767
public function initialize()
    {
        parent::initialize();
        $this->loadHelper('Html', [
            'className' => 'MyHtml'
        ]);
        $this->loadHelper('Time', [
            'className' => 'MyTime'
        ]);
        $this->loadHelper('Number', [
            'className' => 'MyNumber'
        ]);
        $this->loadHelper('Form');
        $this->loadHelper('Menu');
        $this->loadHelper('Slug');
        $this->loadHelper('Text');
        $this->loadHelper('AssetCompress.AssetCompress');
        $this->loadHelper('TimebasedCurrency');
        $this->loadHelper('PricePerUnit');
    }
869257
private function initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                if (self::CONTAINS_KEY === $param->getType()) {
                    $cont = new Contains();
                    $cont->setValue($param->getValue());
                    $this->contains[] = $cont;
                } elseif (self::NEGATE_KEY === $param->getType()) {
                    $this->setNegate(Project::toBoolean($param->getValue()));
                }
            }
        }
    }
726140
private static function init()
    {
        if (!self::$defaultLng) {
            $config = Application::getConfigManager()->loadForModule('Cmf\Language');
            self::$defaultLng = strtolower($config->defaultLanguage);
            $currentLng = $config->currentLanguage;
            self::$currentLng = $currentLng ? strtolower($currentLng) : strtolower($config->defaultLanguage);
        }
    }
142741
public function init()
    {
        if (!isset($this->options['id'])) {
            $this->options['id'] = $this->getId();
        }
        echo self::beginContainer($this->options,$this->tag);
    }
483163
public function init()
    {
        $this->config->set('http', [
            'request' => &$this->request,
            'response' => &$this->response,
        ]);

        Event::trigger('BeforeSystemInit', $this);

        if (!defined('IS_CONSOLE')) {
            $this->initHttpRequest();
        }

        Event::trigger('AfterSystemInit', $rtn);

        return $rtn;
    }
742950
public function init()
{
    $req = $this;

    $job = $this->job = new \PHPDaemon\Core\ComplexJob(function () use ($req) { // called when job is done

        $req->wakeup(); // wake up the request immediately

    });

    $job('getServers', function ($name, $job) use ($req) { // registering job named 'pingjob'

        $req->appInstance->servers->find(function ($cursor) use ($name, $job) {
            $job->setResult($name, $cursor->items);
        });
    });

    $job(); // let the fun begin

    $this->sleep(5); // setting timeout
}
763427
public function init()
    {
        parent::init();

        if ($this->tile !== null) {
            $this->tile->init();
        }

        foreach ($this->groups as $group) {
            $group->init();
            // index the group by id if it is not already indexed
            if (!array_key_exists($group->id, $this->groups_by_id)) {
                $this->groups_by_id[$group->id] = $group;
            }
        }
    }
328211
public function initialize()
    {
        if (true === $this->hasBeenInitialized) {
            return;
        }

        $this->hasBeenInitialized = true;

        foreach ($this->service as $service) {
            list($serviceClassName, $serviceOptions) = $this->manageServiceData($service);

            $this->serviceInstances[$serviceClassName] = $this->getServiceInstance($serviceClassName, $serviceOptions);
        }
    }
470344
public function init()
    {
        $grav = Grav::instance();
        /** @var Config $config */
        $config = $grav['config'];

        $asset_config = (array)$config->get('system.assets');

        /** @var UniformResourceLocator $locator */
        $locator = $grav['locator'];
        $this->assets_dir = $locator->findResource('asset://') . DS;
        $this->assets_url = $locator->findResource('asset://', false);

        $this->config($asset_config);

        // Register any preconfigured collections
        foreach ((array) $this->collections as $name => $collection) {
            $this->registerCollection($name, (array)$collection);
        }
    }