Download the PHP package makowskid/dcfparser without Composer
On this page you can find all versions of the php package makowskid/dcfparser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package dcfparser
DcfParser
DcfParser is a PHP & Laravel package to parse Debian Control Files (DCF format).
Requirements
- PHP 8.2+
Installation
Usage
Parse a file (first stanza)
Parse a string
Parse all stanzas
DCF files can contain multiple stanzas (paragraphs) separated by blank lines:
Laravel
The package auto-discovers its service provider. Use the facade:
DCF Format
Reference: https://www.debian.org/doc/debian-policy/ch-controlfields.html
Example input:
Parsed result (first stanza):
Key behaviors:
- Keys are normalized to lowercase
- Only the first
:splits key from value - Continuation lines (starting with whitespace) are appended to the previous field
- Blank lines separate stanzas
- Comment lines (starting with
#) are skipped - Throws
DcfParserExceptionon malformed input or file errors
Development
Credits
- Dawid Makowski
- Alin Purcaru - thanks for inspiration on StackOverflow
License
The MIT License (MIT). See the License File for more information.
All versions of dcfparser with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.2
The package makowskid/dcfparser contains the following files
Loading the files please wait ...