public function setStrategy($name)
    {
        if (!in_array($name, $this->_validStrategies)) {
            throw new InvalidArgumentException(
                sprintf('Invalid strategy "%s" was provided', $name)
            );
        }
        $this->_strategy = $name;

        return $this;
    }
public function setStrategy($name)
    {
        if (!in_array($name, $this->_validStrategies)) {
            throw new InvalidArgumentException(
                sprintf('Invalid strategy "%s" was provided', $name)
            );
        }
        $this->_strategy = $name;

        return $this;
    }
public function setStrategy ( $ name ) { if ( ! in_array ( $ name , $ this -> _validStrategies ) ) { throw new InvalidArgumentException ( sprintf ( 'Invalid strategy "%s" was provided' , $ name ) ) ; } $ this -> _strategy = $ name ; return $ this ; }
Sets the strategy name to be used to fetch associated records. Keep in mind
that some association types might not implement but a default strategy,
rendering any changes to this setting void.

@param string $name The strategy type. Use null to read the current value.
@return $this
@throws \InvalidArgumentException When an invalid strategy is provided.
Sets the strategy name to be used to fetch associated records . Keep in mind that some association types might not implement but a default strategy rendering any changes to this setting void .