nextAll() public method

Returns the next siblings nodes of the current selection.
public nextAll ( ) : Crawler
return Crawler A Crawler instance with the next sibling nodes
Ejemplo n.º 1
0
 /**
  * @param Crawler $node
  *
  * @return array
  */
 protected function parse(Crawler $node)
 {
     $title = explode(' - ', $node->html());
     // Get the changes
     $nodes = $node->nextAll()->filterXPath('h3[preceding-sibling::h2[1][.="' . $node->html() . '"]]');
     $changes = (new ChangesRetriever($nodes))->retrieve();
     return ['name' => $title[0], 'date' => isset($title[1]) ? $title[1] : null, 'changes' => $changes];
 }
Ejemplo n.º 2
0
 /**
  * @param Crawler $node
  *
  * @return array
  */
 protected function parse(Crawler $node)
 {
     $key = strtolower($node->html());
     if (!$key) {
         return;
     }
     $lines = (new LineRetriever($node->nextAll()->first()->filter('li')))->retrieve();
     return ['section' => $key, 'changes' => $lines];
 }