slicklabs / icf-reader
Reads ICF files
dev-master
2023-01-17 13:47 UTC
Requires (Dev)
- symfony/var-dumper: 6.*
This package is auto-updated.
Last update: 2024-12-17 18:11:39 UTC
README
Read file from disk
You can easily read in an ICF-file stored on disk.
$reader = new \ICFReader\Reader($filepath); $result = $reader->read();
Read data
If you want, you can also parse data from somewhere else than from disk. For easy testing, the below example reads the file contents manually and then processes it.
$icf_file = file_get_contents($filepath); // or from somewhere else. $reader = new \ICFReader\Reader(''); //requires a filepath parameter, but not required for reading in from data. $data = $reader->toArray($icf_file); $result = $reader->format($data);