public static function hasValue($subject, $property, $value) {
    $rval = false;
    if(self::hasProperty($subject, $property)) {
      $val = $subject->{$property};
      $is_list = self::_isList($val);
      if(is_array($val) || $is_list) {
        if($is_list) {
          $val = $val->{'@list'};
        }
        foreach($val as $v) {
          if(self::compareValues($value, $v)) {
            $rval = true;
            break;
          }
        }
      } else if(!is_array($value)) {
        // avoid matching the set of values with an array value parameter
        $rval = self::compareValues($value, $val);
      }
    }
    return $rval;
  }
public static function hasValue($subject, $property, $value) {
    $rval = false;
    if(self::hasProperty($subject, $property)) {
      $val = $subject->{$property};
      $is_list = self::_isList($val);
      if(is_array($val) || $is_list) {
        if($is_list) {
          $val = $val->{'@list'};
        }
        foreach($val as $v) {
          if(self::compareValues($value, $v)) {
            $rval = true;
            break;
          }
        }
      } else if(!is_array($value)) {
        // avoid matching the set of values with an array value parameter
        $rval = self::compareValues($value, $val);
      }
    }
    return $rval;
  }
public static function hasValue ( $ subject , $ property , $ value ) { $ rval = false ; if ( self :: hasProperty ( $ subject , $ property ) ) { $ val = $ subject -> { $ property } ; $ is_list = self :: _isList ( $ val ) ; if ( is_array ( $ val ) || $ is_list ) { if ( $ is_list ) { $ val = $ val -> { '@list' } ; } foreach ( $ val as $ v ) { if ( self :: compareValues ( $ value , $ v ) ) { $ rval = true ; break ; } } } else if ( ! is_array ( $ value ) ) { // avoid matching the set of values with an array value parameter $ rval = self :: compareValues ( $ value , $ val ) ; } } return $ rval ; }
Determines if the given value is a property of the given subject.

@param stdClass $subject the subject to check.
@param string $property the property to check.
@param mixed $value the value to check.

@return bool true if the value exists, false if not.
Determines if the given value is a property of the given subject .