PHP code example of milzer / infx

1. Go to this page and download the library: Download milzer/infx 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/ */

    

milzer / infx example snippets


use milzer\Infx\Entities\Line;

$line = (new Line())
    ->setOfferNumber('ABC1234567')
    ->setPartner('SAT')
    ->setDepartureDate('2025-07-21')
    ->setReturnDate('2025-07-28')
    ->setDepartureAirportOutbound('FRA')
    ->setArrivalAirportOutbound('PMI')
    ->setCurrency('EUR')
    ->setPrice('1199.00')
    ->setHotelName('Club Palma')
    ->setBoardCode('HP')
    ->setOccupancy(2);

echo $line; // Outputs fixed-width INFX line
text
src/
├── Attributes/Field.php         # Field position/type metadata
├── Entities/Line.php           # Main offer entity
├── Traits/…/HasXYZ.php         # Modular field traits
└── Helpers/ValidatorHelper.php # Central validation logic