christophwurst / kitinerary-bin
KItinerary binary executable
Installs: 229 035
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 4
Forks: 5
Open Issues: 0
Requires
- php: ^7.4 || ^8.0
- ext-json: *
- christophwurst/kitinerary: ^0.2.2
- psr/log: ^1.1|^2.0|^3.0
README
Binary executable adapter for the kitinerary extractor package. This package provides an adapter that invokes a shipped kitinerary-extractor executable on x86_64 Linux systems.
The statically linked binary is created from source.
Installation
composer require christophwurst/kitinerary christophwurst/kitinerary-bin
Usage
use ChristophWurst\KItinerary\ItineraryExtractor; use ChristophWurst\KItinerary\Bin\BinaryAdapter; use ChristophWurst\KItinerary\Exception\KItineraryRuntimeException; $adapter = new BinaryAdapter(); if (!$adapter->isAvailable()) { // ... } $extractor = new Extractor($adapter); try { $itinerary = $extractor->extractFromString('...'); } catch (KItineraryRuntimeException $e) { // ... }