Initializes the counters for the supplied pattern
@return void
517206
protected function initCounters()
    {
        $pos = 0;
        while ($pos < strlen($this->pattern)) {
            $char = $this->pattern[$pos];
            if ($char == "{") {
                $this->uriVars++;
                $pos++;
            } else if ($char == "*") {
                if (($pos + 1) < strlen($this->pattern) && $this->pattern[$pos + 1] == "*") {
                    $this->doubleWildcards++;
                    $pos += 2;
                } else if (!substr($this->pattern, $pos - 1) == ".*") {
                    $this->singleWildcards++;
                    $pos++;
                } else {
                    $pos++;
                }
            } else {
                $pos++;
            }
        }
    }
1247482
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $disclosure = new SwatDisclosure();
        $disclosure->id = $disclosure->getUniqueId();
        $prototype_id = $disclosure->id;

        foreach ($children as $child_widget) {
            $disclosure->add($child_widget);
        }

        $this->add($disclosure);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $disclosure = $this->getWidget($prototype_id, $id);
            $disclosure->title = $title;
        }
    }
1062805
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $paramsCount = count($params); $i < $paramsCount; $i++) {
                if (self::TAB_LENGTH_KEY === $params[$i]->getName()) {
                    $this->tabLength = $params[$i]->getValue();
                    break;
                }
            }
        }
    }
1365171
private function initialize()
    {
        // get parameters
        $params = $this->getParameters();
        if ($params !== null) {
            /**
             * @var Parameter $param
             */
            foreach ($params as $param) {
                if ('prepend' === $param->getName()) {
                    $this->setPrepend(new PhingFile($param->getValue()));
                    continue;
                }
                if ('append' === $param->getName()) {
                    $this->setAppend(new PhingFile($param->getValue()));
                    continue;
                }
            }
        }
        if ($this->prepend !== null) {
            if (!$this->prepend->isAbsolute()) {
                $this->prepend = new PhingFile($this->getProject()->getBasedir(), $this->prepend->getPath());
            }
            $this->prependReader = new BufferedReader(new FileReader($this->prepend));
        }
        if ($this->append !== null) {
            if (!$this->append->isAbsolute()) {
                $this->append = new PhingFile($this->getProject()->getBasedir(), $this->append->getPath());
            }
            $this->appendReader = new BufferedReader(new FileReader($this->append));
        }
    }
345587
private function _initialize()
    {
        if ($this->getInitialized()) {
            return;
        }

        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                if ('in' == $param->getName()) {
                    $this->setInputEncoding($param->getValue());
                } else {
                    if ('out' == $param->getName()) {
                        $this->setOutputEncoding($param->getValue());
                    }
                }
            }
        }

        $this->setInitialized(true);
    }
306374
private function initializeForPrefix(): void
    {
        $keys = AdapterUtil::getPropertyValue($this, 'keys');
        $values = AdapterUtil::getPropertyValue($this, 'values');

        if (null === $values) {
            $file = AdapterUtil::getPropertyValue($this, 'file');
            $values = @(include $file) ?: [];

            AdapterUtil::setPropertyValue($this, 'keys', $keys);
            AdapterUtil::setPropertyValue($this, 'values', $values);
        }
    }
716346
protected function init() {
        $this->data['objecttable'] = user_evidence::TABLE;
        $this->data['crud'] = 'u';
        $this->data['edulevel'] = self::LEVEL_OTHER;
    }
429174
def _initialize_counter(self):
        
        if self._counter is not None:
            return

        if self.counter_reference is self:
            self._counter = _Counter(seq=self.factory._setup_next_sequence())
        else:
            self.counter_reference._initialize_counter()
            self._counter = self.counter_reference._counter
905585
private void initPatternControllers() {

        m_patternControllers.put(PatternType.NONE, new CmsPatternPanelNoneController());
        m_patternControllers.put(PatternType.DAILY, new CmsPatternPanelDailyController(m_model, this));
        m_patternControllers.put(PatternType.WEEKLY, new CmsPatternPanelWeeklyController(m_model, this));
        m_patternControllers.put(PatternType.MONTHLY, new CmsPatternPanelMonthlyController(m_model, this));
        m_patternControllers.put(PatternType.YEARLY, new CmsPatternPanelYearlyController(m_model, this));
        // m_patternControllers.put(PatternType.INDIVIDUAL, new CmsPatternPanelIndividualController(m_model, this));
    }
1186540
protected function init()
    {
        $this->data = new Collection();

        if ($this->defaultFile) {
            $file = $this->buildLangFilePath($this->defaultFile . '.' . $this->format);

            if (is_file($file)) {
                $this->data->load($file, $this->format);
            }
        }
    }
1078275
public function init() {

        $args = $this->console->arguments;

        $args->parse();

        if ( $args->defined('hardstart') ) {

            $this->hardstart();

        }

        if ( $args->defined('daemon') ) {

            $this->daemonize();

        } else if ( $args->defined('foreground') ) {

            if ( $args->defined('verbose') ) {
                $this->logger->pushHandler(new LogHandler());
            }

            $this->start();

        } else {

            $this->console->pad()->green()->usage();
            $this->end(0);

        }

    }
510670
public function initialize()
    {
        if (!$this->isInitialized()) {
            $this->getOriginalNodeNames();
            $fetchDepth = $this->fetchDepth > 0 ? $this->fetchDepth + 1 : -1;
            $childNodes = $this->getNode($fetchDepth)->getNodes($this->filter);
            $this->collection = new ArrayCollection($this->getChildren($childNodes));
            $this->initialized = self::INITIALIZED_FROM_PHPCR;
        }
    }
1210837
protected function init()
    {
        foreach($this->excludePaths as $i => $path)
        {
            if(!$this->excludePaths[$i] = realpath($path))
            {
                unset($this->excludePaths[$i]);
            }
        }
        $this->excludeRule = implode('|', array_map('\Imi\Util\Imi::parseRule', $this->excludePaths));
        foreach($this->includePaths as $i => $path)
        {
            if(!$this->includePaths[$i] = $path = realpath($path))
            {
                unset($this->includePaths[$i]);
                continue;
            }
            $directory = new \RecursiveDirectoryIterator($path, \FilesystemIterator::KEY_AS_PATHNAME | \FilesystemIterator::CURRENT_AS_FILEINFO | \FilesystemIterator::SKIP_DOTS);
            $iterator = new \RecursiveIteratorIterator($directory);
            if('' === $this->excludeRule)
            {
                foreach($iterator as $fileName => $fileInfo)
                {
                    $this->parseInitFile($fileName);
                }
            }
            else
            {
                $rule = "/^(?!{$this->excludeRule}).+$/i";
                $regex = new \RegexIterator($iterator, $rule, \RecursiveRegexIterator::GET_MATCH);
                foreach ($regex as $item)
                {
                    $this->parseInitFile($item[0]);
                }
            }
        }
    }
42151
protected function initializeIterator()
    {
        $this->results = $this->getResults();
        $this->resultsCounter = \count($this->results);
    }
924954
public function init()
    {
        Profiler::start('moduleManager', 'init');
        $module = $this->load($this->directory, array(), true);
        if ($module) {
            $this->mainModule = $module;
            $this->add($module);
//            Profiler::start('moduleManager Init');
            $this->mainModule->init();
            $this->mainModule->register_events();
            if (isset($this->config['modules'])) {
                $this->loadConfig($this->config, $this->mainModule);
            }

            foreach ($this->modules as $module) {
                    $module->init();
                    $module->register_router($this->router);
            }
            foreach ($this->modules as $module) {
                if ($module !== $this->mainModule) {
                    $module->register_events();
                }
            }
//            dump($this->modules);
//            die();
//            Profiler::stop('moduleManager Init');
        } else {
            $file = $this->directory . "/config.yml";
            throw new \Exception('Can\'t not load the main module! Looking for: \'' . $file . '\'. folder 
            realpath: ' . realpath($this->directory));
        }
        Profiler::stop('moduleManager');
    }
124453
public function init()
    {
        if( empty($this->options['id'])){
            $this->options['id']='batch_delete';
        }
        if( empty($this->options['class'])){
            $this->options['class']='btn btn-success';
        }
    }
768998
private function initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $_i = count($params); $i < $_i; $i++) {
                if (self::LINES_KEY == $params[$i]->getName()) {
                    $this->lines = (int) $params[$i]->getValue();
                    continue;
                }
                if (self::SKIP_KEY == $params[$i]->getName()) {
                    $this->skip = (int) $params[$i]->getValue();
                    continue;
                }
            }
        }
    }