コード例 #1
0
ファイル: main.php プロジェクト: bdunogier/tcl
 /**
  * Returns the lines list, with links to further details about each
  * @return ezcMvcResult
  */
 public function doLignes()
 {
     $result = new ezcMvcResult();
     $scrapperLignes = new tclScraperLignes();
     $result->variables['lignes'] = $scrapperLignes->get();
     $result->variables['tcl-url'] = $scrapperLigne->url;
     return $result;
 }
コード例 #2
0
ファイル: details_ligne.php プロジェクト: bdunogier/tcl
 /**
  * Constructor
  * @param string $idLigne
  */
 public function __construct($idLigne)
 {
     $this->idLigne = $idLigne;
     $this->params['page'] = 'horaires';
     $this->params['etape'] = 2;
     $this->params['Date'] = implode('|', array(date('Y'), date('m'), date('d')));
     $this->params['submit'] = 'Valider';
     // use tclScraperLignes to get the line string
     // very bad, this needs some server side storage :)
     $scrapper = new tclScraperLignes();
     $lines = $scrapper->get();
     if (!isset($lines[$idLigne])) {
         throw new tclScraperNotFoundException('line', $idLigne);
     }
     $this->ligne = $lines[$idLigne];
     $this->params['Line'] = $this->ligne->string;
 }