src/Model/Behavior/EnumBehavior.php
public function strategy($alias, $strategy)
    {
        if (!empty($this->_strategies[$alias])) {
            return $this->_strategies[$alias];
        }

        $this->_strategies[$alias] = $strategy;

        if ($strategy instanceof StrategyInterface) {
            return $strategy;
        }

        if (isset($this->_classMap[$strategy])) {
            $class = $this->_classMap[$strategy];
        }

        if (!class_exists($class)) {
            throw new MissingEnumStrategyException([$class]);
        }

        return $this->_strategies[$alias] = new $class($alias, $this->_table);
    }
public function strategy($alias, $strategy)
    {
        if (!empty($this->_strategies[$alias])) {
            return $this->_strategies[$alias];
        }

        $this->_strategies[$alias] = $strategy;

        if ($strategy instanceof StrategyInterface) {
            return $strategy;
        }

        if (isset($this->_classMap[$strategy])) {
            $class = $this->_classMap[$strategy];
        }

        if (!class_exists($class)) {
            throw new MissingEnumStrategyException([$class]);
        }

        return $this->_strategies[$alias] = new $class($alias, $this->_table);
    }
Getter/setter for strategies.

@param string $alias Strategy's alias.
@param mixed $strategy Strategy name from the class map or some strategy instance.
@return \CakeDC\Enum\Model\Behavior\Strategy\StrategyInterface
@throws \CakeDC\Enum\Model\Behavior\Exception\MissingEnumStrategyException