Download the PHP package markuszeller/php-annotations without Composer
On this page you can find all versions of the php package markuszeller/php-annotations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download markuszeller/php-annotations
More information about markuszeller/php-annotations
Files in markuszeller/php-annotations
Download markuszeller/php-annotations
More information about markuszeller/php-annotations
Files in markuszeller/php-annotations
Vendor markuszeller
Package php-annotations
Short Description Simple tool for parsing annotations
License MIT
Homepage https://github.com/markuszeller/php-annotations
Package php-annotations
Short Description Simple tool for parsing annotations
License MIT
Homepage https://github.com/markuszeller/php-annotations
Please rate this library. Is it a good library?
Informations about the package php-annotations
php-annotations
This class helps reading annotations.
Features
- reads from a string
- reads from a file
- supports multiline annotation values
- auto trims values
Note
Reads only annotations from DocComments included in /** [...] */
.
Look into that double asterisk.
Usage
Initialise an Annotation object
require_once '../vendor/autoload.php';
use markuszeller\Annotations\Reader;
$reader = new Reader();
Put some data into the annotation reader instance
-
by a string
$cssString = file_get_contents('./template.css'); $reader->loadFromString($cssString);
-
by file
if($reader->loadFromFile("./example.css") === false) { exit("Error loading file"); }
Get all the annotations as an associative array
$annotationArray = $reader->getAnnotations();
Get a single annotation by name
$title = $reader->getAnnotation('title');
All versions of php-annotations with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.1
The package markuszeller/php-annotations contains the following files
Loading the files please wait ....