Exemplo n.º 1
0
 /**
  * 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;
 }
Exemplo n.º 2
0
 /**
  * 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;
 }