Lndj\Traits\Parser::parserCommonTable PHP Method

parserCommonTable() public method

Parser the common table, like cet, chooseClass, etc.
public parserCommonTable ( type | Object $body, type | string $selector = '#DataGrid1' ) : array
$body type | Object
$selector type | string
return array
    public function parserCommonTable($body, $selector = '#DataGrid1')
    {
        $crawler = new Crawler((string) $body);
        $crawler = $crawler->filter($selector);
        $cet = $crawler->children();
        $data = $cet->each(function (Crawler $node, $i) {
            return $node->children()->each(function (Crawler $node, $j) {
                return $node->text();
            });
        });
        //Unset the title.
        unset($data[0]);
        return $data;
    }