public getElementById ( string $id ) : |
||
$id | string | |
return |
public function getElementById($id)
{
$this->isLoaded();
return $this->find('#' . $id, 0);
}
public function testConfigStrict() { $dom = new Dom(); $dom->setOptions(['strict' => true]); $dom->load('<div><p id="hey">Hey you</p> <p id="ya">Ya you!</p></div>'); $this->assertEquals(' ', $dom->getElementById('hey')->nextSibling()->text); }