public function __construct($html) { $this->crawler = new Crawler(); $this->crawler->addHtmlContent($html, 'UTF-8'); }