original_string: protected function _setValidator($validator)
      {
          if (!is_null($validator) && !($validator instanceof ValidatorInterface)) {
              throw $this->_createInvalidArgumentException($this->__('Invalid validator'), null, null, $validator);
          }
  
          $this->validator = $validator;
      }
code: protected function _setValidator($validator)
      {
          if (!is_null($validator) && !($validator instanceof ValidatorInterface)) {
              throw $this->_createInvalidArgumentException($this->__('Invalid validator'), null, null, $validator);
          }
  
          $this->validator = $validator;
      }
code_tokens: protected function _setValidator ( $ validator ) { if ( ! is_null ( $ validator ) && ! ( $ validator instanceof ValidatorInterface ) ) { throw $ this -> _createInvalidArgumentException ( $ this -> __ ( 'Invalid validator' ) , null , null , $ validator ) ; } $ this -> validator = $ validator ; }
docstring: Assigns a validator to this instance.
  
  @since [*next-version*]
  
  @param ValidatorInterface|null $validator The validator.
docstring_tokens: Assigns a validator to this instance .