PHP code example of ezzaze / ssim-parser
1. Go to this page and download the library: Download ezzaze/ssim-parser library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ezzaze / ssim-parser example snippets
use Ezzaze\SsimParser\SsimParser;
// From a raw SSIM string
$parser = new SsimParser();
$schedule = $parser->load($ssimData)->parse();
// From a file
$schedule = (new SsimParser())->load('/path/to/schedule.ssim')->parse();
var_dump($schedule[0]);
/*
array:12 [
"uid" => "30330703070000501"
"airline_designator" => "ME"
"service_type" => "J"
"flight_number" => "501"
"departure_datetime" => "2022-07-03 07:00:00"
"arrival_datetime" => "2022-07-03 08:40:00"
"departure_utc_datetime" => "2022-07-03 03:00:00"
"arrival_utc_datetime" => "2022-07-03 06:40:00"
"departure_iata" => "EVN"
"arrival_iata" => "HRG"
"aircraft_type" => "320"
"aircraft_configuration" => "Y174"
]
*/
bash
composer analyse