Init logs for current component;
@param array $config
@return null
@throws \Exception
967479
protected function init($config) {
        foreach ($this->loggers as $class => $config) {
            if (!is_array($config)) {
                $class = $config;
                $config = [];
            }
            $instance = $class::get($config);
            if (!is_a($instance, 'mpf\\loggers\\Logger'))
                throw new \Exception("Loggers must extend mpf\\base\\Logger class!");
            $this->loggersInstances[] = $instance;
        }
    }
636320
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->_action = $this->_controller->request->getParam('action');
        $this->_request = $this->_controller->request;

        if (!isset($this->_controller->dispatchComponents)) {
            $this->_controller->dispatchComponents = [];
        }

        $this->_controller->dispatchComponents['Crud'] = true;
    }
658474
public function initialize(array $config)
    {
        parent::initialize($config);

        if (Plugin::getCollection()->has('Assets')) {
            $this->Asset = $this->getView()->loadHelper('Assets.Asset');
        } else {
            $this->Asset = clone $this->Html;
        }
    }
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;
	}
1339251
public function initialize(array $config)
    {
        $table = Configure::read('Muffin/Tokenize.table', self::DEFAULT_TABLE);

        $this->setTable($table);
        $this->setPrimaryKey('id');
        $this->setDisplayField('token');

        $this->addBehavior('Timestamp');
    }
824166
public function initialize(array $config)
    {
        if (!$this->_config['key']) {
            $this->setConfig('key', Security::getSalt());
        }

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

        if ($controller === null) {
            $this->request = ServerRequestFactory::fromGlobals();
        }

        if (empty($this->_config['path'])) {
            $this->setConfig('path', $this->getController()->getRequest()->getAttribute('webroot'));
        }
    }
131933
public function initialize(array $config)
    {
        parent::initialize($config);

        $_config = [
            'context'  => __d('core', 'record'),
            'redirect' => [
                'action'     => 'index',
                'prefix'     => $this->_request->getParam('prefix'),
                'plugin'     => $this->_request->getParam('plugin'),
                'controller' => $this->_request->getParam('controller'),
            ],
            'messages' => [
                'no_action' => __d('core', 'Action not found.'),
                'no_choose' => __d('core', 'Please choose only one item.'),
            ]
        ];

        $config = Hash::merge($_config, $config);
        $this->setConfig($config);
    }
1264809
protected function _initialize(KObjectConfig $config)
    {
        $config->append(array(
            'enabled'  => true,
            'priority' => self::PRIORITY_LOWEST,
            'loggers'  => array(),
        ));

        // Append the default logger if none is set.
        if (!count($config->loggers)) {
            $config->append(array('loggers' => array('com:activities.activity.logger')));
        }

        parent::_initialize($config);
    }
115115
public function initialize(array $config)
    {
        $this->table('users');
        $this->displayField('email');
        $this->primaryKey('id');
        $this->addBehavior('Timestamp');

        $this->belongsTo('Users.Roles');

        $this->postType = [
            'formFields' => [
                'id',
                'email',
                'new_password' => [
                    'type' => 'password',
                ],
                'confirm_password' => [
                    'type' => 'password'
                ],
                'role_id',
                'active' => [
                    'type' => 'checkbox'
                ],
            ],
            'tableColumns' => [
                'id' => [],
                'email' => [],
                'role_id' => [
                    'get' => 'role.name'
                ],
                'active',
                'created' => []
            ],
            'filters' => [
                'email'
            ],
            'query' => function ($query) {

                $query->contain(['Roles']);

                return $query;
            },
        ];
    }
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;
            }
        }
    }
1295443
public function initialize(array $config) {
		parent::initialize($config);

		$this->addBehavior('Timestamp');
		if (Configure::read('Queue.isSearchEnabled') !== false && Plugin::isLoaded('Search')) {
			$this->addBehavior('Search.Search');
		}

		$this->belongsTo('WorkerProcesses', [
			'className' => 'Queue.QueueProcesses',
			'foreignKey' => false,
			'conditions' => [
				'WorkerProcesses.workerkey = QueuedJobs.workerkey',
			],
		]);
	}
77116
public function initialize(array $config)
    {
        $this->setController($this->_registry->getController());

        $this->_registerPostTypesFromConfigure();

        $this->_addMenuItems();
    }
496787
public function initialize(array $config) {
        parent::initialize($config);

        // set request
        $this->ctrl = $this->getController();
        $this->cookies = (new CookieCollection())->createFromServerRequest($this->ctrl->getRequest());
    }
305455
public function initConfig($config)
    {  
        if (is_string($config)) {
            if (file_exists(($configFile = $config)) ||
                file_exists(($configFile = dirname(dirname(__FILE__)).self::DS.$config))
            ) {
                $config = $this->loadConfig($configFile);
            }
        } elseif (!is_array($config) && !is_object($config)) {
            throw new \Exception("Invalid configuration.", 1);
        }

        $this->mergeConfig($config);

        $this->doCallback('configurationInitiated', array($this->_configuration, $this));

        return $this;
    }
267238
public function initialize(array $config)
    {
        parent::initialize($config);

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

        $this->_addFromConfigure();

        // set up the default helper
        $this->Controller->helpers['Utils.Menu'] = [];
    }
878392
protected function initializeConfig(array $config = null)
    {
        $default = $this->defaultConfigurations();

        $this->config = $config ? array_replace_recursive($default, $config) : $default;
    }
245975
public function preInit(&$config)
    {
        // merge core components with custom components
        foreach ($this->coreComponents() as $id => $component) {
            if (!isset($config['components'][$id])) {
                $config['components'][$id] = $component;
            } elseif (is_array($config['components'][$id]) && !isset($config['components'][$id]['class'])) {
                $config['components'][$id]['class'] = $component['class'];
            }
        }
    }