ezzaze/ssim-parser

IATA SSIM schedules parser

Fund package maintenance!
ezzaze

1.1.1 2024-02-10 22:02 UTC

README

Latest Version on Packagist Tests Total Downloads

This package allows the developers working with airline companies to extract the flight schedule directly off the Standard Schedules Information (SSIM) from IATA.

Installation

You can install the package via composer:

composer require ezzaze/ssim-parser

Usage

$data = "
    1AIRLINE STANDARD SCHEDULE DATA SET     1                                                                                                                                                      001000001
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    2LME  0008S22 27MAR2226MAR2315JUL22                             13JUN22C NetLine/Sched  2016.2.8                                                                                              0749000002
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    3 ME  5010101J03JUL2223OCT22      7 EVN07000700+0400  HRG08400840+0200  320                                                              ME  502                            Y174                00000003
    3 ME  5010201J06JUL2226OCT22  3     EVN09200920+0400  HRG11001100+0200  320                                                              ME  502                            Y174                00000004
    3 ME  5020101J03JUL2223OCT22      7 HRG09200920+0200  EVN14351435+0400  320                                                              ME  503                            Y174                00000005
    3 ME  5020201J06JUL2206JUL22  3     HRG11401140+0200  EVN16551655+0400  320                                                              ME  5032                           Y174                00000006
    3 ME  5020301J13JUL2226OCT22  3     HRG11401140+0200  EVN16551655+0400  320                                                              ME  503                            Y174                00000007
    3 ME  5030101J04JUL2229OCT221    6  EVN11001100+0400  SSH12251225+0200  320                                                              ME  504                            Y174                00000008
    3 ME  5030201J13JUL2226OCT22  3     EVN17551755+0400  SSH19201920+0200  320                                                              ME  504                            Y174                00000009
    3 ME  5040101J04JUL2224OCT221       SSH13051305+0200  EVN18051805+0400  320                                                              ME  5011                           Y174                00000010
    3 ME  5040201J09JUL2222OCT22     6  SSH13051305+0200  EVN18051805+0400  320                                                              ME  501                            Y174                00000011
    3 ME  5040301J13JUL2226OCT22  3     SSH20002000+0200  EVN01000100+0400  320                                                              ME  5032                           Y174                01000012
    3 ME  5040401J29OCT2229OCT22     6  SSH13051305+0200  EVN18051805+0400  320                                                                                                 Y174                00000013
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    5 ME                                                                                                                                                                                       000013E000014
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
    00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
";
$skeleton = new Ezzaze\SsimParser();
$schedule = $skeleton->parse($data);
var_dump($schedule[0]);
/*
    array:11 [
        "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"
        "aicraft_type" => "320"
        "aicraft_configuration" => "Y174"
    ]
*/

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.