public function strategy($name = null)
    {
        deprecationWarning(
            get_called_class() . '::strategy() is deprecated. ' .
            'Use setStrategy()/getStrategy() instead.'
        );
        if ($name !== null) {
            $this->setStrategy($name);
        }

        return $this->getStrategy();
    }
public function strategy($name = null)
    {
        deprecationWarning(
            get_called_class() . '::strategy() is deprecated. ' .
            'Use setStrategy()/getStrategy() instead.'
        );
        if ($name !== null) {
            $this->setStrategy($name);
        }

        return $this->getStrategy();
    }
public function strategy ( $ name = null ) { deprecationWarning ( get_called_class ( ) . '::strategy() is deprecated. ' . 'Use setStrategy()/getStrategy() instead.' ) ; if ( $ name !== null ) { $ this -> setStrategy ( $ name ) ; } return $ this -> getStrategy ( ) ; }
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.
If no arguments are passed, the currently configured strategy is returned.

@deprecated 3.4.0 Use setStrategy()/getStrategy() instead.
@param string|null $name The strategy type. Use null to read the current value.
@return string
@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 . If no arguments are passed the currently configured strategy is returned .