00001 <?php
00011 require_once(dirname(__FILE__).'/genericppfinterface.php');
00012
00017 class LFSWInterface extends GenericPPFInterface
00018 {
00026 function getHostList()
00027 {
00028 if(!class_exists('LFSWorldHostsList'))
00029 include PPF_ROOT_DIR.'/providers/LFSW/hosts.php';
00030 $provider = new LFSWorldHostsList();
00031 return $this->getData($provider, array());
00032 }
00033
00045 function getChart($track, $car, $control=null)
00046 {
00047 if(!class_exists('LFSWorldChart'))
00048 include PPF_ROOT_DIR.'/providers/LFSW/ch.php';
00049
00050 $params = array('track'=>$track, 'car'=>$car);
00051 if($control != null)
00052 $params['control'] = $control;
00053
00054 $provider = new LFSWorldChart();
00055 return $this->getData($provider, array('providerParams'=>$params));
00056 }
00057
00066 function getHotlaps($racer)
00067 {
00068 if(!class_exists('LFSWorldHotlaps'))
00069 include PPF_ROOT_DIR.'/providers/LFSW/hl.php';
00070
00071 $provider = new LFSWorldHotlaps();
00072 return $this->getData($provider, array('providerParams' => array('racer' => $racer)));
00073 }
00074
00083 function getPBs($racer)
00084 {
00085 if(!class_exists('LFSWorldPersonalBests'))
00086 include PPF_ROOT_DIR.'/providers/LFSW/pb.php';
00087
00088 $provider = new LFSWorldPersonalBests();
00089 return $this->getData($provider, array('providerParams' => array('racer' => $racer)));
00090 }
00091
00100 function getPST($racer)
00101 {
00102 if(!class_exists('LFSWorldPersonalStats'))
00103 include PPF_ROOT_DIR.'/providers/LFSW/pst.php';
00104
00105 $provider = new LFSWorldPersonalStats();
00106 return $this->getData($provider, array('providerParams' => array('racer' => $racer)));
00107 }
00108
00116 function getTeams()
00117 {
00118 if(!class_exists('LFSWorldTeamsList'))
00119 include PPF_ROOT_DIR.'/providers/LFSW/teams.php';
00120
00121 $provider = new LFSWorldTeamsList();
00122 return $this->getData($provider, array());
00123 }
00124
00133 function getWRs($control=null)
00134 {
00135 if(!class_exists('LFSWorldWorldRecords'))
00136 include PPF_ROOT_DIR.'/providers/LFSW/wr.php';
00137
00138 $params = array();
00139 if($control != null)
00140 $params['control'] = $control;
00141
00142 $provider = new LFSWorldWorldRecords();
00143 return $this->getData($provider, array('providerParams' => $params));
00144 }
00145
00155 function getHighlights($country, $noParse=false)
00156 {
00157 if(!class_exists('LFSWorldHighlights'))
00158 include PPF_ROOT_DIR.'/providers/LFSW/highlights.php';
00159
00160 $noParse = (bool)$noParse;
00161 $provider = new LFSWorldHighlights();
00162 return $this->getData($provider, array('providerParams' => array('country' => $country, 'noParse' => $noParse)));
00163 }
00164
00173 function getHotlapLog($params=array())
00174 {
00175 if(!class_exists('LFSWorldHotlapLog'))
00176 include PPF_ROOT_DIR.'/providers/LFSW/hllog.php';
00177
00178 $provider = new LFSWorldHotlapLog();
00179 return $this->getData($provider, array('providerParams' => $params));
00180 }
00181 }
00182 ?>