public function fire()
 {
     $timetablePath = $this->argument('timetable-path');
     $memoryUsage = new \stdClass();
     $memoryUsage->start = $this->formatBytes(memory_get_usage());
     $timetable = new Timetable($timetablePath);
     $climate = new \League\CLImate\CLImate();
     $memoryUsage->peak = $this->formatBytes(memory_get_peak_usage());
     $memoryUsage->end = $this->formatBytes(memory_get_usage());
     $climate->out('Stop Points');
     $climate->table($timetable->getStopPoints());
     $climate->border();
     $climate->table($timetable->getRoutes());
     $climate->border();
     $climate->out('Memory Usage');
     $climate->table([$memoryUsage]);
 }
Exemple #2
0
<?php

require_once 'vendor/autoload.php';
use Exercise\TravelersRepository;
$climate = new League\CLImate\CLImate();
$climate->clear();
$climate->red('Hello. This is SQL exercise script.');
$travelersRepo = new TravelersRepository();
$climate->table($travelersRepo->getAllTravelersWithDestinations());
$climate->table($travelersRepo->getTravelersByDestinations(array('Cuba', 'Sochi')));
$climate->table($travelersRepo->getTravelersByDestinations(array('Cuba', 'Sochi'), true));