Ejemplo n.º 1
0
 protected function handler(IResource $resource)
 {
     $source = Neon::decode($resource->get());
     $root = new Node();
     $this->walk($source, $root);
     return $root;
 }
Ejemplo n.º 2
0
 public function rewind()
 {
     if ($this->continue) {
         $this->continue = false;
         return;
     }
     $this->index = 0;
     $this->incrementalSource = null;
     $this->tokenStack->cleanup();
     $this->tokenList = token_get_all($this->resource->get());
     $this->tokenCount = count($this->tokenList);
     $this->next();
 }