christophwurst / kitinerary-sys
KItinerary binding for the system package
Installs: 212 476
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 4
Forks: 3
Open Issues: 0
Requires
- php: ^7.1 || ^8.0
- ext-json: *
- christophwurst/kitinerary: ^0.2.2
- psr/log: ^1.1|^2.0|^3.0
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-10-30 08:21:51 UTC
README
System executable adapter for the kitinerary extractor package. This package provides an adapter that invokes the binary installed on the system, e.g. with a Linux distribution's package manager.
Installation
composer require christophwurst/kitinerary christophwurst/kitinerary-sys
Usage
use ChristophWurst\KItinerary\ItineraryExtractor; use ChristophWurst\KItinerary\Sys\SysAdapter; use ChristophWurst\KItinerary\Exception\KItineraryRuntimeException; $adapter = new SysAdapter(); if (!$adapter->isAvailable()) { // ... } $extractor = new Extractor($adapter); try { $itinerary = $extractor->extractFromString('...'); } catch (KItineraryRuntimeException $e) { // ... }