/** * @return Horaire[] */ public function getHoraires() { $response = Totem::query(array('xml' => 3, 'refs' => $this->refs, 'ran' => 1)); $ret = array(); if ($response->body instanceof SimpleXMLElement) { /** @var $horaires SimpleXMLElement */ $horaires = $response->body->horaires; /** @var $horaire SimpleXMLElement */ foreach ($horaires->children() as $horaire) { $ret[] = Horaire::fromXml($this, $horaire); } } return $ret; }
/** * List of all Arrets on this Ligne * @return Arret[] */ public function listerArrets() { $response = Totem::query(array('xml' => 1, 'ligne' => $this->code, 'sens' => $this->sens)); $ret = array(); if ($response->body instanceof SimpleXMLElement) { /** @var $alss SimpleXMLElement */ $alss = $response->body->alss; /** @var $als SimpleXMLElement */ foreach ($alss->children() as $als) { $ret[] = Arret::fromXml($this, $als); } } return $ret; }
/** * List of lines * @return Ligne[] */ public static function listerLignes() { $response = Totem::query(array('xml' => 1)); $ret = array(); if ($response->body instanceof SimpleXMLElement) { /** @var $alss SimpleXMLElement */ $alss = $response->body->alss; /** @var $als SimpleXMLElement */ foreach ($alss->children() as $als) { $ret[] = Ligne::fromXml($als); } } return $ret; }