You are here

public function AbstractHydrator::addStrategy in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/zendframework/zend-hydrator/src/AbstractHydrator.php \Zend\Hydrator\AbstractHydrator::addStrategy()

Adds the given strategy under the given name.

Parameters

string $name The name of the strategy to register.:

Strategy\StrategyInterface $strategy The strategy to register.:

Return value

HydratorInterface

Overrides StrategyEnabledInterface::addStrategy

File

vendor/zendframework/zend-hydrator/src/AbstractHydrator.php, line 94

Class

AbstractHydrator

Namespace

Zend\Hydrator

Code

public function addStrategy($name, Strategy\StrategyInterface $strategy) {
  $this->strategies[$name] = $strategy;
  return $this;
}