public function saveStrategy($strategy = null)
    {
        deprecationWarning(
            'BelongsToMany::saveStrategy() is deprecated. ' .
            'Use setSaveStrategy()/getSaveStrategy() instead.'
        );
        if ($strategy !== null) {
            $this->setSaveStrategy($strategy);
        }

        return $this->getSaveStrategy();
    }
public function saveStrategy($strategy = null)
    {
        deprecationWarning(
            'BelongsToMany::saveStrategy() is deprecated. ' .
            'Use setSaveStrategy()/getSaveStrategy() instead.'
        );
        if ($strategy !== null) {
            $this->setSaveStrategy($strategy);
        }

        return $this->getSaveStrategy();
    }
public function saveStrategy ( $ strategy = null ) { deprecationWarning ( 'BelongsToMany::saveStrategy() is deprecated. ' . 'Use setSaveStrategy()/getSaveStrategy() instead.' ) ; if ( $ strategy !== null ) { $ this -> setSaveStrategy ( $ strategy ) ; } return $ this -> getSaveStrategy ( ) ; }
Sets the strategy that should be used for saving. If called with no
arguments, it will return the currently configured strategy

@deprecated 3.4.0 Use setSaveStrategy()/getSaveStrategy() instead.
@param string|null $strategy the strategy name to be used
@throws \InvalidArgumentException if an invalid strategy name is passed
@return string the strategy to be used for saving
Sets the strategy that should be used for saving . If called with no arguments it will return the currently configured strategy