'item', self::FN_AND => 'and', self::FN_OR => 'or', self::FN_NOT => 'not' ); // (string representations of) filter (item) comparator tags public static $fCompTags = array ( self::FC_PRESENT => 'present', self::FC_EQUAL => 'equal', self::FC_LESS => 'less', self::FC_GREATER => 'greater' ); public function toFNodeTagVal($strRepr) { if (is_string($strRepr) && ($vkey = array_search($strRepr, self::$fNodeTags)) !== false) { return $vkey; } else { throw new Exception("Invalid filter node tag: $strRepr"); } } public function toFCompTagVal($strRepr) { if (is_string($strRepr) && ($vkey = array_search($strRepr, self::$fCompTags)) !== false) { return $vkey; } else { throw new Exception("Invalid filter comperator tag: $strRepr"); } } }