src/Model/Behavior/Strategy/AbstractStrategy.php
public function initialize($config)
    {
        if (is_string($config)) {
            $config = ['prefix' => $config];
        }

        $prefix = $this->getConfig('prefix');
        if (empty($config['prefix']) && empty($prefix)) {
            $config['prefix'] = $this->_generatePrefix();
        }

        if (empty($config['field'])) {
            $config['field'] = Inflector::underscore($this->_alias);
        }

        if (empty($config['errorMessage'])) {
            $config['errorMessage'] = __d('cake', 'The provided value is invalid');
        }

        $this->setConfig($config);

        return $this;
    }
public function initialize($config)
    {
        if (is_string($config)) {
            $config = ['prefix' => $config];
        }

        $prefix = $this->getConfig('prefix');
        if (empty($config['prefix']) && empty($prefix)) {
            $config['prefix'] = $this->_generatePrefix();
        }

        if (empty($config['field'])) {
            $config['field'] = Inflector::underscore($this->_alias);
        }

        if (empty($config['errorMessage'])) {
            $config['errorMessage'] = __d('cake', 'The provided value is invalid');
        }

        $this->setConfig($config);

        return $this;
    }
{@inheritdoc}

@param mixed $config Strategy's configuration.
@return $this