public function run() { if (!$this->user()->stop) { throw new \Exception('Nessuna fermata impostata!'); } $stop = new Stop($this->user()->stop); $this->replyWithMessage('Linee fermata ' . $stop->getName()); $this->replyWithMessage($stop->getRoutesDisplay()); }
/** * @inheritdoc */ public function run($arguments) { list($stopId) = explode(' ', $arguments); $stop = new Stop($stopId); list($lat, $lng) = $stop->getLatLng(); $this->user()->stop = $stopId; $this->replyWithMessage('Fermata ' . $stop->getName() . ' impostata.'); $this->replyWithMessage('Linee per questa fermata:'); $this->replyWithMessage($stop->getRoutesDisplay()); $this->replyWithLocation($lat, $lng); $this->replyWithMessage($this->user()->getHint()); }