Example #1
0
 /**
  * Parse current tokens
  *
  * @return $this
  */
 public function refresh()
 {
     $newCode = $this->collection->assemble();
     $tokens = Helper::getTokensFromString($newCode);
     $this->collection->setItems($tokens);
     return $this;
 }
Example #2
0
 /**
  * Remove all invalid tokens in collection
  * Refresh index.
  *
  * @return $this
  */
 public function refresh()
 {
     $string = $this->assemble();
     $this->cleanCollection();
     $tokens = Helper::getTokensFromString($string);
     $this->setItems($tokens);
     $this->rewind();
     return $this;
 }