Ejemplo n.º 1
0
 public function testParse()
 {
     $p = new PropertyQuery("*");
     print_r($p->match_Expr());
     $p = new PropertyQuery("*.*");
     print_r($p->match_Expr());
     $p = new PropertyQuery("*[*]");
     print_r($p->match_Expr());
     $p = new PropertyQuery("a.b[0].c[1].d");
     print_r($p->match_Expr());
 }
Ejemplo n.º 2
0
 public function parsePropertyQuery($query)
 {
     if ($this->cache->has($query)) {
         return $this->cache->get($query);
     }
     $q = new PropertyQuery($query);
     $r = $q->match_Expr();
     if ($r) {
         $this->cache->put($query, $r);
     } else {
         $this->cache->put($query, false);
     }
     return $r;
 }