getElementById() 공개 메소드

public getElementById ( $id )
예제 #1
0
 /**
  * Return the HTML string of just the given ID.
  * @param $id string
  * @param $pop boolean - remove the element when done processing?
  * @return string
  * @throws \Exception
  */
 public function getId($id, $pop = true)
 {
     if ($node = $this->html->getElementById($id)) {
         $html = $this->process($node);
         if ($pop) {
             $node->outertext = "";
         }
         return $html;
     }
     return "";
 }