Initialises the session.

@param array $config configuration array
770450
protected function initSession( array $config )
    {
        if ( isset( $config[ 'session' ] ) )
        {
            if ( isset( $config[ 'session' ][ 'class' ] ) )
            {
                $this->bindShared( 'RawPHP\RawSession\Contract\ISession', function () use ( $config )
                {
                    $class = $config[ 'session' ][ 'class' ];

                    return new $class( $config[ 'session' ] );
                }
                );
            }
            else
            {
                $this->bindShared( 'RawPHP\RawSession\Contract\ISession', function () use ( $config )
                {
                    return new Session( $config[ 'session' ] );
                }
                );
            }
        }
        else
        {
            $this->bindShared( 'RawPHP\RawSession\Contract\ISession', function ()
            {
                return new Session();
            }
            );
        }

        $this->alias( 'RawPHP\RawSession\Contract\ISession', 'session' );

        $this->flash = $this[ 'session' ]->get( 'messages' );

        if ( empty( $this->flash ) )
        {
            $this->flash = [
                'errors'  => [ ],
                'success' => [ ],
            ];
        }
    }
1287515
public function initialize(array $config)
    {
        $this->table('settings');

        $this->addBehavior('Wasabi/Core.KeyValue', [
            'scope' => 'Core'
        ]);

        $this->cacheDurations = [
            '1 hour' => __d('wasabi_core', '1 hour'),
            '2 hours' => __d('wasabi_core', '{0} hours', 2),
            '4 hours' => __d('wasabi_core', '{0} hours', 4),
            '8 hours' => __d('wasabi_core', '{0} hours', 8),
            '16 hours' => __d('wasabi_core', '{0} hours', 16),
            '1 day' => __d('wasabi_core', '1 day'),
            '2 days' => __d('wasabi_core', '{0} days', 2),
            '5 days' => __d('wasabi_core', '{0} days', 5),
            '7 days' => __d('wasabi_core', '{0} days', 7),
            '14 days' => __d('wasabi_core', '{0} days', 14),
            '30 days' => __d('wasabi_core', '{0} days', 30),
            '60 days' => __d('wasabi_core', '{0} days', 60),
            '90 days' => __d('wasabi_core', '{0} days', 90),
            '180 days' => __d('wasabi_core', '{0} days', 180),
            '365 days' => __d('wasabi_core', '{0} days', 365),
            '999 days' => __d('wasabi_core', '{0} days', 999)
        ];

        parent::initialize($config);
    }
399369
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->table('users');
        $this->displayField('username');
        $this->primaryKey('id');

        $this->addBehavior('Timestamp');
        $this->addBehavior('Muffin/Trash.Trash');
        $this->addBehavior('Muffin/Tokenize.Tokenize');

        if (Plugin::loaded('Search')) {
            $this->addBehavior('Search.Search');
        }
    }
1024284
public function initialize(array $config)
    {
        Type::map('proffer.file', '\Proffer\Database\Type\FileType');
        $schema = $this->_table->getSchema();
        foreach (array_keys($this->getConfig()) as $field) {
            $schema->setColumnType($field, 'proffer.file');
        }
        $this->_table->setSchema($schema);
    }
708845
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->Controller = $this->_registry->getController();

        if ($this->config('Auth')) {
            $this->Controller->loadComponent('Auth', $this->config('Auth'));
        }

        $this->Controller->loadComponent('Utils.Menu');
    }
235760
public function initialize(array $config)
    {
        $this->table('attachments');
        $this->displayField('filename');
        $this->primaryKey('id');
        $this->addBehavior('Timestamp');

        $this->schema()->columnType('tags', 'json');
    }
1078408
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setTable('pages');
        $this->setDisplayField('title');
        $this->setPrimaryKey('id');

        $this->belongsTo('Categories', ['className' => 'MeCms.PagesCategories'])
            ->setForeignKey('category_id')
            ->setJoinType('INNER')
            ->setTarget($this->getTableLocator()->get('MeCms.PagesCategories'))
            ->setAlias('Categories');

        $this->addBehavior('Timestamp');
        $this->addBehavior('CounterCache', ['Categories' => ['page_count']]);

        $this->_validatorClass = PageValidator::class;
    }
822830
protected function _initialize(ObjectConfig $config)
    {
        $config->append(array(
            'max' => PHP_INT_MAX,
            'min' => ~PHP_INT_MAX,
        ));

        parent::_initialize($config);
    }
715199
public function initialize(array $config)
    {
        $controller = $this->_registry->getController();
        $this->request = $controller->request;
        $this->response = $controller->response;
        $this->session = $controller->request->session();

        $this->eventManager($controller->eventManager());
        $this->eventManager()->dispatch(new Event('Guardian.getGuestActions', $this));

        if (!self::$_instance) {
            self::$_instance = &$this;
        }
    }
1082635
public function initialize(array $config)
    {
        $table = Configure::check('CakephpBlueimpUpload.upload_table') ? Configure::read('CakephpBlueimpUpload.upload_table') : 'uploads';

        $this->setTable($table);
        $this->setDisplayField('id');
        $this->setPrimaryKey('id');
        $this->addBehavior('Timestamp');
        $this->addBehavior('Alaxos.UserLink');
    }
781000
protected function _initialize(AnConfig $config)
     {
         $config->append(array(
             'session' => false,
             'session_name' => $this->getName()
         ));

         parent::_initialize($config);
    }
786214
public function initialize(array $config)
    {
        parent::initialize($config);

        $this
            ->setPrimaryKey('id')
            ->setTable(CMS_TABLE_GROUPS)
            ->setDisplayField('name');

        $this->addBehavior('Tree');
        $this->addAssociations([
            'belongsTo' => [
                'ParentGroup' => [
                    'foreignKey' => 'parent_id',
                    'className'  => 'Community.Group'
                ]
            ],
            'hasMany' => [
                'Users' => [
                    'dependent' => true,
                    'className' => 'Community.Users',
                ]
            ]
        ]);
    }
50265
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setTable('tags');
        $this->setDisplayField('tag');
        $this->setPrimaryKey('id');

        $this->belongsToMany('Posts', ['className' => 'MeCms.Posts', 'joinTable' => 'posts_tags'])
            ->setForeignKey('tag_id')
            ->setTargetForeignKey('post_id')
            ->setThrough('MeCms.PostsTags');

        $this->addBehavior('Timestamp');

        $this->_validatorClass = TagValidator::class;
    }
176436
public function init($config = [])
    {

        if (isset($config['session_cache'])) {
            $session_type = $config['session_cache'];
        } else {
            $session_type = $config['cache_type'];
        }

        /**
         * initialize the current Cache
         */
        $param              = new \stdClass();
        $param->type        = (string)$session_type;
        $param->credentials = (($s = Config::get('session_cache_settings') == '') ? Config::get('cache_settings') : $s);
        // write it to the cache
        $this->engine = CacheManager::getInstance($param);

        if (!$this->engine || !$this->engine->isConnected()) return false;

        return true;
    }
197528
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->dir     = Configure::read('Cms.docDir');
        $this->locale  = Configure::read('App.defaultLocale');
        $this->charset = Str::low(Configure::read('App.encoding'));
        $this->eol     = (Configure::read('debug')) ? PHP_EOL : '';
        $this->tab     = (Configure::read('debug')) ? Configure::read('Cms.lineTab') : '';
    }
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);
    }
528742
public function initialize(array $config) {
        $this->config = $config;
        $this->controller = $this->_registry->getController();
        $registry = new ComponentRegistry();
        $this->Acl = new AclComponent($registry, Configure::read('Acl'));
        $this->Aco = $this->Acl->Aco;
        $this->Aro = $this->Acl->Aro;
        return null;
    }