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()); }
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; }