original_string: public function isValid($value, $context = array())
      {
          $this->_setValue((string) $value);
  
          $fieldSet = (boolean) isset($context[$this->_fieldName]) && $context[$this->_fieldName];
          $valueSet = (boolean) $value;
  
          if ($valueSet && (! $fieldSet))  {
              return true;
          }
  
          if ((! $valueSet) && $fieldSet)  {
              return true;
          }
  
          $this->_error(self::NEITHER);
          return false;
      }
code: public function isValid($value, $context = array())
      {
          $this->_setValue((string) $value);
  
          $fieldSet = (boolean) isset($context[$this->_fieldName]) && $context[$this->_fieldName];
          $valueSet = (boolean) $value;
  
          if ($valueSet && (! $fieldSet))  {
              return true;
          }
  
          if ((! $valueSet) && $fieldSet)  {
              return true;
          }
  
          $this->_error(self::NEITHER);
          return false;
      }
code_tokens: public function isValid ( $ value , $ context = array ( ) ) { $ this -> _setValue ( ( string ) $ value ) ; $ fieldSet = ( boolean ) isset ( $ context [ $ this -> _fieldName ] ) && $ context [ $ this -> _fieldName ] ; $ valueSet = ( boolean ) $ value ; if ( $ valueSet && ( ! $ fieldSet ) ) { return true ; } if ( ( ! $ valueSet ) && $ fieldSet ) { return true ; } $ this -> _error ( self :: NEITHER ) ; return false ; }
docstring: Defined by \Zend_Validate_Interface
  
  Returns true if and only if a token has been set and the provided value
  matches that token.
  
  @param  mixed $value
  @return boolean
docstring_tokens: Defined by \ Zend_Validate_Interface