- public function setContinuationManager( $manager ) {
- if ( $manager !== null ) {
- if ( !$manager instanceof ApiContinuationManager ) {
- throw new InvalidArgumentException( __METHOD__ . ': Was passed ' .
- is_object( $manager ) ? get_class( $manager ) : gettype( $manager )
- );
- }
- if ( $this->mContinuationManager !== null ) {
- throw new UnexpectedValueException(
- __METHOD__ . ': tried to set manager from ' . $manager->getSource() .
- ' when a manager is already set from ' . $this->mContinuationManager->getSource()
- );
- }
+ public function setContinuationManager( ApiContinuationManager $manager = null ) {
+ if ( $manager !== null && $this->mContinuationManager !== null ) {
+ throw new UnexpectedValueException(
+ __METHOD__ . ': tried to set manager from ' . $manager->getSource() .
+ ' when a manager is already set from ' . $this->mContinuationManager->getSource()
+ );