Ejemplo n.º 1
0
 private function parsePartial($html, $encoding)
 {
     $result = $this->parseFull('<body id="ArcPartialHTML">' . $html . '</body>', $encoding);
     if ($result) {
         $result = new \arc\html\Proxy($result->find('#ArcPartialHTML')[0]->children(), $this);
     } else {
         throw new \arc\UnknownError('Could not parse html.', \arc\exceptions::ILLEGAL_ARGUMENT);
     }
     return $result;
 }
Ejemplo n.º 2
0
 private function parsePartial($html, $encoding)
 {
     $result = $this->parseFull('<div id="ArcPartialHTML">' . $html . '</div>', $encoding);
     if ($result) {
         $result = new \arc\html\Proxy($result->find('#ArcPartialHTML')[0]->children(), $this);
     } else {
         throw new \arc\Exception('parse error');
     }
     return $result;
 }