protected function evaluate ()
  {
    $prop = $this->props;
    $np   = Parser::NAMELESS_PROP;
    $v    = isset ($prop->$np) ? $prop->$np : $prop->get ('value');
    $not  = $prop->not;

    if (exists ($prop->matches))
      return (bool)preg_match ("%$prop->matches%", $v) xor $not;

    if ($prop->case) {
      foreach ($prop->case as $param) {
        if ($v == $param->props->get ('is')) // Note that we use the loose comparison operator == here.
          return true;
      }
      return false;
    }

    return strToBool ($v) xor $not;
  }
protected function evaluate ()
  {
    $prop = $this->props;
    $np   = Parser::NAMELESS_PROP;
    $v    = isset ($prop->$np) ? $prop->$np : $prop->get ('value');
    $not  = $prop->not;

    if (exists ($prop->matches))
      return (bool)preg_match ("%$prop->matches%", $v) xor $not;

    if ($prop->case) {
      foreach ($prop->case as $param) {
        if ($v == $param->props->get ('is')) // Note that we use the loose comparison operator == here.
          return true;
      }
      return false;
    }

    return strToBool ($v) xor $not;
  }
protected function evaluate ( ) { $ prop = $ this -> props ; $ np = Parser :: NAMELESS_PROP ; $ v = isset ( $ prop -> $ np ) ? $ prop -> $ np : $ prop -> get ( 'value' ) ; $ not = $ prop -> not ; if ( exists ( $ prop -> matches ) ) return ( bool ) preg_match ( "%$prop->matches%" , $ v ) xor $ not ; if ( $ prop -> case ) { foreach ( $ prop -> case as $ param ) { if ( $ v == $ param -> props -> get ( 'is' ) ) // Note that we use the loose comparison operator == here. return true ; } return false ; } return strToBool ( $ v ) xor $ not ; }
Evaluates the condition of the If clause.

@return bool
Evaluates the condition of the If clause .