/**
  * Class Constructor
  */
 function __construct()
 {
     $this->adapter = Elios_Service_Thetvdb_Adapter::getInstance();
     $this->apikey = $this->adapter->getApiKey();
     $this->where = array();
     //@todo limit setMirrors calls
     $this->adapter->setMirors();
     $this->mirrortype = self::XMLMASK;
 }
Exemplo n.º 2
0
<?php

/*
 * TheTvDb Service Setup
 */
require_once dirname(__FILE__) . '/Adapter.php';
$tvdb_adapter = Elios_Service_Thetvdb_Adapter::getInstance();
$tvdb_adapter->setApiKey("APIKEY");
$tvdb = new Elios_Service_Thetvdb_Thetvdb();
/*
 * Get the current mirror
 */
$mirror = $tvdb->getAvailableMirror();
/*
 * Get the current server time
 * store this value in database for future updates
 */
$time = $tvdb->getServerTime();
$seriesT = new Elios_Service_Thetvdb_Series();
/*
 * Search a serie by name
 */
$series = $seriesT->findByName("South Park", "en");
foreach ($series as $serie) {
    echo $serie->nom . "&nbsp;" . $serie->thetvdb_id . '<br/>';
}
/*
 * Now we use thedvdb_id to get full serie data
 * Elios_Service_Thetvdb_Serie attributes:
 * 
 * public $thetvdb_id;