hamboldt / php-doc-reader
Reads configurations from comments in PHP, converting them from JSON to arrays.
v1.0.2
2016-05-10 12:02 UTC
Requires (Dev)
- php: >=5.4.0
- phpunit/phpunit: 4.8.1
This package is not auto-updated.
Last update: 2024-11-13 10:47:05 UTC
README
Reads configuration assets in objects and elements, just like in the example below:
composer require hamboldt/php-doc-reader
Example
<?php /** * Look this amazing configurable class. * @configure {"config_name":"config_value"} */ class MyConfigurableClass { /** * Look this amazing configurable property! * @configure {"config_name":"config_value"} */ public $property; } // array("config_name" => "config_value") PhpDocReader\Reader::getConfig('MyConfigurableClass'); // array("config_name" => "config_value") PhpDocReader\Reader::getConfig('MyConfigurableClass', 'property');