Returns the code for initializing the container.

@return string
183103
public function compileContainerCode()
    {
        $builder = new ContainerBuilder($this->configTree);
        foreach ($this->plugins as $name => $plugin) {
            $plugin->setContainerBuilder($builder);
        }
        $containerNode = $builder->build();
        $buffer = new Buffer();
        $buffer->write('<?php')->eol();
        $containerNode->compile($buffer);
        $buffer->writeln('return $z;');
        $code = $buffer->getResult();
        return $code;
    }
306601
public function getInstance()
    {
        if ($this->isSingleton() && $this->hasInstance()) {
            return $this->instance;
        }

        // require path
        if ($this->path) {
            require_once $this->path;
        }

        // initialize
        if ($this->isClosure()) {
            $closure = $this->class;
            $instance = $closure($this->container);
        } else {
            $class = $this->class;
            if ($class[0] !== '\\') $class = '\\' . $class;
            $script = sprintf('$instance = new %s(%s);', $class, $this->array2ArgsWithInjectDependency('$this->args', $this->args));
            eval($script);
        }

        if ($this->isSingleton()) {
            $this->instance = $instance;
        }
        if ($this->container && method_exists($instance, 'setContainer')) {
            $instance->setContainer($this->container);
        }
        
        // inject dependency
        if ($this->container) {
            $this->container->injectDependency($instance);
        }
        
        // init method
        if ($this->hasInitMethod()) {
            $this->callInitMethod($instance);
        } elseif($this->hasInitializeMethod($instance)) {
            $instance->initialize();
        }

        return $instance;
    }
136652
private function getContainer()
    {
        if (null === $this->container && null !== $this->application) {
            $this->container = $this->application->getContainer();
        }

        return $this->container;
    }
1007792
private function _getCode(){
        $code = null;
        //try{
            $text = $this->text;
            $textColor = new CINColor($this->foregroundColor);
            $backgroudColor = new CINColor($this->backgroundColor);
            $fontPath = isset($this->font) ? $this->font : $this->_getDefaultFont();

            $font = new CINFontFile($fontPath, (is_int($this->fontSize)) ? $this->fontSize : 18);

            $codeClass = "\\CodeItNow\\BarcodeBundle\\Generator\\".$this->barcodeType;
            $code = new $codeClass();
            if($this->scale){
                $code->setScale($this->scale); // Resolution
            }
            if($this->thickness){
                $code->setThickness($this->thickness); // Thickness
            }
            if($this->label !== FALSE){
                $code->setLabel($this->label);
            }
            if($this->noLengthLimit){
                $code->setNoLengthLimit($this->noLengthLimit);
            }
            if($this->allowsUnknownIdentifier){
                $code->setAllowsUnknownIdentifier($this->allowsUnknownIdentifier);
            }
            $code->setForegroundColor($textColor); // Color of bars
            $code->setBackgroundColor($backgroudColor); // Color of spaces
            $code->setFont($font); // Font (or 0)
            $code->parse($text); // Text
        //} catch (\Exception $ex) {
            
        //}
        return $code;
    }
1307736
protected function getContainer()
    {
        if ($this->innerContainer instanceof ContainerInterface) {
            // Do nothing
        } elseif (!is_readable($this->innerContainer)) {
            throw new RuntimeException(
                sprintf(
                    "Unable to read file %s\n",
                    $this->innerContainer
                )
            );
        } else {
            // 'containerBuilder.php' file expects $installDir variable to be set by caller
            $installDir = $this->installDir;
            $this->innerContainer = require_once $this->innerContainer;
        }

        // Compile container if necessary
        if ($this->innerContainer instanceof ContainerBuilder && !$this->innerContainer->isFrozen()) {
            $this->innerContainer->compile();
        }
    }
887165
public function buildCode()
    {
        $res = '';
        foreach ($this->styles as $href => $val) {
            $res .= '<link href="' . $href . '" rel="stylesheet" type="text/css" />' . "\r\n";
        }

        return $res;
    }
165273
private function initScope()
    {
        if ($this->getSection() === null) {
            $this->setSection('');
        }
        if ($this->getContainer() === null) {
            $this->setContainer('');
        }
        if ($this->getStore() === null) {
            $this->setStore('');
        }

        $scope = 'default';
        $scopeCode = 'default';

        if ($this->getStore()) {
            $scope = 'containers_stores';
            $store = $this->_storeManager->getStore($this->getStore());
            $scopeCode = $store->getId();
            if ($this->getContainer() && ($this->getContainer() != "")) {
                $scopeCode = $this->getContainer() . "|" . $scopeCode;
            }
        } elseif ($this->getContainer()) {
            $scope = 'containers';
            $container = $this->containersSource->get($this->getContainer());
            $scopeCode = $container['name'];
        }

        $this->setScope($scope);
        $this->setScopeCode($scopeCode);
        $this->setScopeId($scopeCode);
    }
461613
public static function i()
    {
        $class = get_called_class();
        $initArgs = func_get_args();
        if (count($initArgs) === 1) {
            $initArgs = $initArgs[0];
        }

        if (!empty(self::$_baseInstances[$class])) {
            $inst = self::$_baseInstances[$class];
            if (!empty($initArgs)) {
                $inst->initConfig($initArgs);
            }

            return $inst;
        }

        return new $class($initArgs);
    }
188071
public static function getContainer()
    {
        if (!(self::$container instanceof Container)) {
            self::$container = new Container();
            self::$container->load();
        }

        return self::$container;
    }
481511
public function getCodeAttribute()
    {
        $length = $this->business->pref('appointment_code_length');

        return strtoupper(substr($this->hash, 0, $length));
    }
1223178
public function getOrganizationCode()
    {
        if (! $this->_orgCode) {
            $this->_orgCode = $this->currentOrganization->getCode();
            if (! $this->_orgCode) {
                $this->_orgCode = \MUtil_File::cleanupName($this->currentOrganization->getName());
            }

        }

        return $this->_orgCode;
    }
174223
protected function initDefaults()
    {
        if (!$this->hasDefaults) {
            return '';
        }

        $this->defaultsLocation = get_calling_class_directory($this) . DIRECTORY_SEPARATOR . $this->defaultsLocation;

        return ConfigFactory::loadConfigFile($this->defaultsLocation);
    }
1258064
function initializer()
    {
        if ($this->initializer)
            return $this->initializer;

        // ..

        $initializer = new InitializerAggregate($this);

        # attach defaults:
        $initializer->addCallable(function($instance, $self) {
            if ($instance instanceof iServicesAware)
                // Inject Service Container Inside
                $instance->setServices($self);
        }, 10000);

        return $this->initializer = $initializer;
    }
136013
public function code()
    {
        $code = $this->language()->code() . '_' . $this->territory()->code();

        if ($this->script() != $this->language()->defaultScript()) {
            $code .= '@' . strtolower($this->script()->unicodeName());
        }

        if ($this->variant() !== null) {
            if ($this->variant()->code() === 'posix') {
                $code = 'POSIX';
            } else {
                $code .= '@' . $this->variant()->code();
            }
        }

        return $code;
    }
399856
public function compile(): string
    {
        $code = 'new \\' . \get_class($this) . '(';
        $code .= \var_export($this->namespace, true) . ', [';
        
        $index = 0;
        
        foreach ($this->imports as $k => $v) {
            if ($index++ != 0) {
                $code .= ', ';
            }
            
            $code .= \var_export($k, true) . ' => ' . \var_export($v, true);
        }
        
        return $code . '])';
    }
1188256
private function init()
    {
        static $initComplete;
        $out = '';

        if (!empty($initComplete)) {
            return '';
        }

        if ($this->initialized) {
            $initComplete = true;

            return '';
        }

        $args = '';
        $ckeditorPath = $this->ckeditorPath();

        if (!empty($this->timestamp) && $this->timestamp != '%'.'TIMESTAMP%') {
            $args = '?t='.$this->timestamp;
        }

        // Skip relative paths...
        if (strpos($ckeditorPath, '..') !== 0) {
            $out .= $this->script("window.CKEDITOR_BASEPATH='".$ckeditorPath."';");
        }

        $out .= '<script type="text/javascript" src="'.$ckeditorPath.'ckeditor.js'.$args."\"></script>\n";

        $extraCode = '';
        if ($this->timestamp != self::timestamp) {
            $extraCode .= ($extraCode ? "\n" : '')."CKEDITOR.timestamp = '".$this->timestamp."';";
        }
        if ($extraCode) {
            $out .= $this->script($extraCode);
        }

        $initComplete = $this->initialized = true;

        return $out;
    }
73699
public function initialize()
    {
        $lang = $this;

        if (is_callable($this->options['lang'])) {
            $this->options['lang'] = call_user_func($this->options['lang']);
        }

        if ($p = realpath(rtrim($this->app->config('bono.base.path'), DIRECTORY_SEPARATOR))) {
            $this->addBaseDirectory($p, 9);
        }

        $d = explode(DIRECTORY_SEPARATOR.'src', __DIR__);
        $this->addBaseDirectory($d[0]);

        $this->app->container->singleton('lang', function () use ($lang) {
            return $lang;
        });
    }