Initialises the handler.

@param array $config configuration array
420484
public function init( $config = [ ] )
    {
        foreach ( $config as $key => $value )
        {
            switch ( $key )
            {
                case 'level':
                    $this->_level = ( int ) $value;
                    break;

                case 'mailer':
                    $this->_mailer = $value;
                    break;

                case 'formatter':
                    $this->_formatter = new $value();
                    break;

                default:
                    // do nothing
                    break;
            }
        }
    }
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();
    }
14565
public function initialize(array $config) {
		// Shims
		if (isset($this->useTable)) {
			$this->setTable($this->useTable);
		}
		if (isset($this->primaryKey)) {
			$this->setPrimaryKey($this->primaryKey);
		}
		if (isset($this->displayField)) {
			$this->setDisplayField($this->displayField);
		}
		$this->_shimRelations();

		$this->_prefixOrderProperty();

		if (isset($this->actsAs)) {
			foreach ($this->actsAs as $name => $options) {
				if (is_numeric($name)) {
					$name = $options;
					$options = [];
				}
				$this->addBehavior($name, $options);
			}
		}

		if ($this->createdField || $this->modifiedField && !$this->hasBehavior('Timestamp')) {
			$this->addBehavior('Timestamp');
		}
	}
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 () );
			}
		}
	}
359187
public function initialize(array $config)
    {
        $this->setTable('tags_tags');
        $this->setDisplayField('label');
        $this->addBehavior('Timestamp');
        if (Plugin::loaded('Muffin/Slug')) {
            $this->addBehavior('Muffin/Slug.Slug');
        }
    }
127689
public function initialize(array $config)
    {
        parent::initialize($config);

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

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

        $this->belongsTo('Users', ['className' => 'MeCms.Users'])
            ->setForeignKey('user_id')
            ->setJoinType('INNER');

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

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

        $this->_validatorClass = PostValidator::class;
    }
469559
public function initialize(array $config) {
		$controller = $this->_registry->getController();
		$this->setEventManager($controller->getEventManager());

		$this->Captchas = $controller->Captchas;
	}
1180642
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setAlias('Categories');
        $this->setTable('pages_categories');
        $this->setDisplayField('title');
        $this->setPrimaryKey('id');

        $this->belongsTo('Parents', ['className' => 'MeCms.PagesCategories'])
            ->setForeignKey('parent_id');

        $this->hasMany('Childs', ['className' => 'MeCms.PagesCategories'])
            ->setForeignKey('parent_id');

        $this->hasMany('Pages', ['className' => 'MeCms.Pages'])
            ->setForeignKey('category_id');

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

        $this->_validatorClass = PagesCategoryValidator::class;
    }
1133971
private function configure(array $config = [])
    {
        foreach ($config as $property => $value) {
            if (property_exists($this, $property)) {
                $this->{$property} = $value;
            }
        }
    }
1228151
public function initialize(array $config = [])
    {
        $this->setConfig($config);
        $this->_registry->getController()->viewBuilder()->setHelpers(['Recaptcha.Recaptcha' => $this->_config]);
    }
92249
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->table('tickets');
        $this->displayField('name');
        $this->primaryKey('id');

        $this->addBehavior('Timestamp');
    }
982815
private function applyConfig(array $config): void
    {
        // override
        if ($this->config != null) {
            $config = Config::merge($config, $this->config->getData());
        }
        $this->config = new Config($config);

        // set/reset logger options
        $loggerOptions = $this->config->get('logger');
        if ($loggerOptions != null) {
            isset($loggerOptions['level']) && $this->logger->setLevel($loggerOptions['level']);
            isset($loggerOptions['directory']) && $this->logger->setDirectory($loggerOptions['directory']);
        }
    }
287586
protected function initialize(array $config)
    {
        $this->swooleServer = $this->createSwooleServer($config);

        $this->configureDefaultServerSocket();

        $this->setOptions($config['options'] ?? []);

        $this->registerEventCallbacks($this->serverEvents);

        $this->events->dispatch(new Events\ServerCreated($this));
    }
998487
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->table('profiles');
        $this->displayField('name');
        $this->primaryKey('id');

        $this->belongsTo('Users', [
            'foreignKey' => 'user_id',
            'joinType' => 'INNER',
            'className' => 'CakeAuth.Users'
        ]);
    }
6708
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setEmailObject(new Email($this->config('config')));
    }
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');
    }
493024
private function init($config = array())
    {
        $this->getCore()->open($this->getFilename(), $config);
        if ($this->currentSheet !== null) {
            $this->getCore()->setSheet($this->currentSheet);
        }
    }