Initialize table config.

@param array $config Config options
@return void
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');
        }
    }
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);
    }
1199329
private function setConfig($config)
	{
		foreach ($config as $key => $value) {
			$this->setConfigParam($key, $value);
		}

	}
918499
static public function setConfig(array $config)
    {
        foreach ($config as $k => $v) {
            self::$_config[$k] = $v;
        }
    }
536642
public function initialize(array $config)
    {
        parent::initialize($config);

        $this->setTable('banners');
        $this->setDisplayField('filename');
        $this->setPrimaryKey('id');

        $this->belongsTo('Positions', ['className' => 'MeCms.BannersPositions'])
            ->setForeignKey('position_id')
            ->setJoinType('INNER');

        $this->addBehavior('Timestamp');
        $this->addBehavior('CounterCache', ['Positions' => ['banner_count']]);

        $this->_validatorClass = BannerValidator::class;
    }
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;
            }
        }
    }
790471
public function initialize(array $config)
    {
        parent::initialize($config);

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

        $usersClass = empty($config['usersClassOptions']) ? Configure::read('Tokens.usersClassOptions') : $config['usersClassOptions'];
        if ($usersClass) {
            $this->belongsTo('Users', $usersClass);

            if (!$this->Users->hasAssociation('tokens')) {
                $this->Users->hasMany('Tokens')->setForeignKey('user_id');
            }
        }
    }
1243221
public function setConfig(&$config)
    {
        $this->_checkConfig($config);

        $this->config = $config;
        $this->init();
    }
1096922
public function initialize(array $config)
    {
        parent::initialize($config);

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

        $this->removeBehavior('Timestamp');
    }
1328837
public function init( $config = [ ] )
    {
        if ( isset( $config[ 'error_callback' ] ) )
        {
            $this->errorCallback = $config[ 'error_callback' ];
        }

        if ( isset( $config[ 'exception_callback' ] ) )
        {
            $this->exceptionCallback = $config[ 'exception_callback' ];
        }

        if ( isset( $config[ 'shutdown_callback' ] ) )
        {
            $this->shutdownCallback = $config[ 'shutdown_callback' ];

            register_shutdown_function( $this->shutdownCallback );
        }

        set_error_handler( [ $this, 'handleError' ], E_ALL );

        set_exception_handler( [ $this, 'handleException' ] );
    }
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'));
        }
    }
592682
public function initialize(array $config)
    {
        parent::initialize($config);

        if (isset($config['emptyValues'])) {
            $this->setConfig('emptyValues', $config['emptyValues'], false);
        }

        $collectionClass = $this->getConfig('collectionClass');
        if ($collectionClass) {
            $this->_collectionClass = $collectionClass;

            return;
        }

        $defaultCollectionClass = sprintf(
            '%s\Model\Filter\%sCollection',
            Configure::read('App.namespace'),
            $this->getTable()->getAlias()
        );
        if (class_exists($defaultCollectionClass)) {
            $this->_collectionClass = $defaultCollectionClass;
        }
    }
551588
public function setConfig($config = [])
    {
        $this->config = $config;
        $this->debug->debug(__FUNCTION__, 'setConfig: ', $this->config);
    }
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;
        }
    }
432678
public function initialize(array $config)
    {
        parent::initialize($config);

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

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

        $this->addBehavior('Timestamp');

        $this->_validatorClass = BannersPositionValidator::class;
    }
841888
public function initialize(array $config)
    {
        $this->setTable($this->tablePrefix . $this->getTable());
        // HttpClient needs special header HTTP_X_UNIT_TEST_MODE => set in AppCakeTestCase::initHttpClient()
        if (isset($_SERVER['HTTP_X_UNIT_TEST_MODE'])
            || (php_sapi_name() == 'cli' && $_SERVER['argv'][0] && preg_match('/phpunit/', $_SERVER['argv'][0]))) {
            $this->setConnection(ConnectionManager::get('test'));
        }
        parent::initialize($config);
    }
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']);
        }
    }