|  |  | 
 |  |  |       } | 
 |  |  |       $this->context = $context->item(0); | 
 |  |  |        | 
 |  |  |       $name = $this->xpath->query('.//h2[@class="sh2"]//span//text()', $this->context); | 
 |  |  |       $name = $this->xpath->query('.//*[@class="sh2"]//span//text()', $this->context); | 
 |  |  |       if($name->length != 1) { | 
 |  |  |          throw new Exception('Nie znaleziono nazwy stacji, błędny HTML.'); | 
 |  |  |       } | 
 |  |  | 
 |  |  |    function xmltv($id, $fp) { | 
 |  |  |       $program = array(); | 
 |  |  |        | 
 |  |  |       ini_set('mbstring.substitute_character', 'none'); | 
 |  |  | 		 | 
 |  |  |       $days_dom = $this->xpath->query('.//ul[@class="lsDay"]//li', $this->context); | 
 |  |  |       $days = array(); | 
 |  |  |       foreach($days_dom as $day) { | 
 |  |  | 
 |  |  |                $nazwa = $this->xpath->query('.//h3', $programs)->item(0)->textContent; | 
 |  |  |                $opis = $this->xpath->query('.//p', $programs)->item(0)->textContent; | 
 |  |  |                 | 
 |  |  |                $program[$num][] = array( | 
 |  |  |                   $godzina, | 
 |  |  |                   mb_convert_encoding($nazwa, 'UTF-8', 'UTF-8'), | 
 |  |  |                   mb_convert_encoding($opis, 'UTF-8', 'UTF-8') | 
 |  |  |                ); | 
 |  |  |                $program[$num][] = array($godzina, $nazwa, $opis); | 
 |  |  |             } | 
 |  |  |             unset($programs_dom, $programs); | 
 |  |  |          } |