Initialize the Cache Engine

Called automatically by the cache frontend

@param array $config array of setting for the engine
@return bool True if the engine has been successfully initialized, false if not
187027
public function init(array $config = [])
    {
        if (!extension_loaded('redis')) {
            return false;
        }

        if (!empty($config['host'])) {
            $config['server'] = $config['host'];
        }

        parent::init($config);

        return $this->_connect();
    }
738369
public function init($config)
    {
        $this->_initiated = true;
        if ($this->isNewRecord()) {
            $this->_tableName = static::getTableName();
            $this->_db = $this->_db ? $this->_db : static::getDb();
            $this->_columns = static::getDb()->getTableColumns($this->_tableName);
            $this->_pk = static::getDb()->getTablePk($this->_tableName);
        } else {
            if (is_array($this->_pk)) {
                $this->_originalPk = [];
                foreach ($this->_pk as $k) {
                    $this->_originalPk[$k] = $this->_attributes[$k];
                }
            } else {
                $this->_originalPk = $this->_attributes[$this->_pk];
            }
            $this->afterLoad();
        }
        $this->applyRelationsAttributes();
        return parent::init($config);
    }
1351455
public function initialize(array $config)
    {
        $this->table('cms_pages');

        $this->hasOne('Collections', [
            'className' => 'Wasabi/Cms.Collections',
            'dependent' => true
        ]);

        $this->hasMany('Contents', [
            'className' => 'Wasabi/Cms.Contents',
            'foreignKey' => 'page_id',
            'dependent' => true
        ]);

        $this->hasMany('Current', [
            'className' => 'Wasabi/Cms.Contents',
            'foreignKey' => 'page_id',
            'finder' => 'Current'
        ]);

        $this->hasMany('Attributes', [
            'className' => 'Wasabi/Cms.Attributes',
            'foreignKey' => 'foreign_key',
            'conditions' => [
                'model' => 'Wasabi/Cms.Pages',
                'language_id' => Wasabi::contentLanguage()->id
            ],
            'dependent' => true
        ]);

        $this->hasMany('Routes', [
            'className' => 'Wasabi/Core.Routes',
            'foreignKey' => 'foreign_key',
            'conditions' => [
                'model' => 'Wasabi/Cms.Pages'
            ],
            'dependent' => true
        ]);

        $this->addBehavior('Translate', self::$translateOptions);

        $this->addBehavior('Tree');
        $this->addBehavior('Timestamp');

        $this->locale(Wasabi::contentLanguage()->iso2);
    }
968404
public static function run(array &$config) {
		self::$config = $config;
		self::startTemplateEngine ( $config );
		if (isset ( $config ['sessionName'] ))
			USession::start ( $config ['sessionName'] );
		self::forward ( $_GET ['c'] );
	}
842661
public function initialize(array $config)
    {
        $config += $this->_defaultConfig;
        $this->config('fields', $this->_resolveFields($config['fields']));
        $this->config('strategy', $this->_resolveStrategy($config['strategy']));
    }
391358
protected function getCacheRepository(array $config)
    {

        $connection = Arr::get($config, 'connections.cache');
        return $this->app->make('cache')->driver($connection);
    }
89835
public static function init(&$config) {
		$controllers = CacheManager::getControllers ();
		foreach ( $controllers as $controller ) {
			CacheManager::$cache->remove( self::getControllerCacheKey ( $controller ));
			$parser = new DiControllerParser ();
			$parser->parse ( $controller, $config );
			$injections = $parser->getInjections ();
			if (sizeof ( $injections ) > 0) {
				self::store ( $controller, $parser->__toString () );
			}
		}
	}
235760
public function initialize(array $config)
    {
        $this->table('attachments');
        $this->displayField('filename');
        $this->primaryKey('id');
        $this->addBehavior('Timestamp');

        $this->schema()->columnType('tags', 'json');
    }
878392
protected function initializeConfig(array $config = null)
    {
        $default = $this->defaultConfigurations();

        $this->config = $config ? array_replace_recursive($default, $config) : $default;
    }
1010325
public function initialize(array $config)
    {
        $this->table('cms_menu_items');

        $this->belongsTo('Menus', [
            'className' => 'Wasabi/Cms.Menus'
        ]);

        $this->addBehavior('CounterCache', ['Menus' => ['menu_item_count']]);
        $this->addBehavior('Tree');
        $this->addBehavior('Timestamp');
    }
1145411
public static function init($config = [])
    {
        if (!self::$config) {
            self::$config = include __DIR__ ."/default-config.php";
        }
        self::$config = Arr::array_merge_multi(self::$config, $config);
    }
697653
public function init(array $config) {
		if ($config) {
			foreach ($config as $key => $value) {
				$method = 'set' . ucfirst(camel_case($key));

				if (method_exists($this, $method)) {
					$this->$method($value);
				}
			}
		}

		return $this;
	}
77116
public function initialize(array $config)
    {
        $this->setController($this->_registry->getController());

        $this->_registerPostTypesFromConfigure();

        $this->_addMenuItems();
    }
213875
protected function initialize(array $config = [])
    {
        // Create a resolve and configure the defaults
        $resolver = new OptionsResolver();
        $this->configureDefaults($resolver);

        try
        {
            // Parse the config in avanzu_admin_theme.options as array object in avanzu_admin_context.options
            $newConfig = $resolver->resolve($config);
            // Change the internal storage array in the ArrayObject
            $this->exchangeArray($newConfig);
        }
        catch(UndefinedOptionsException $e)
        {
            echo $e->getMessage() . PHP_EOL;
            print_r($config, TRUE);
        }
    }
887244
public function initialize(array $config = [])
    {
        if (empty($this->engine)) {
            if ($this->isSupported()) {
                $this->engine = new \JBBCode\Parser();
                $this->engine->addCodeDefinitionSet(new \JBBCode\DefaultCodeDefinitionSet());
            } else {
                throw new RuntimeException(
                    'PARSER_E_THIRD_PARTY',
                    0,
                    ['BBCode Parser by Jackson Owens', 'https://github.com/jbowens/jBBCode']
                );
            }
        }

        return $this;
    }
111643
public function init(array $config = [])
    {
        parent::init($config);

        if ($this->_config['path'] === null) {
            $this->_config['path'] = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'cake_cache' . DIRECTORY_SEPARATOR;
        }
        if (DIRECTORY_SEPARATOR === '\\') {
            $this->_config['isWindows'] = true;
        }
        if (substr($this->_config['path'], -1) !== DIRECTORY_SEPARATOR) {
            $this->_config['path'] .= DIRECTORY_SEPARATOR;
        }
        if ($this->_groupPrefix) {
            $this->_groupPrefix = str_replace('_', DIRECTORY_SEPARATOR, $this->_groupPrefix);
        }

        return $this->_active();
    }
1341986
public function initialize(array $config)
    {
        $this->hasMany('BlockRegions', [
            'className' => 'Block.BlockRegions',
            'foreignKey' => 'block_id',
            'dependent' => true,
            'propertyName' => 'region',
        ]);
        $this->hasMany('Copies', [
            'className' => 'Block.Blocks',
            'foreignKey' => 'copy_id',
            'dependent' => true,
            'propertyName' => 'copies',
            'cascadeCallbacks' => true,
        ]);
        $this->belongsToMany('User.Roles', [
            'className' => 'User.Roles',
            'foreignKey' => 'block_id',
            'joinTable' => 'blocks_roles',
            'dependent' => false,
            'propertyName' => 'roles',
        ]);

        $this->addBehavior('Serializable', [
            'columns' => ['locale', 'settings']
        ]);
    }