dev-master
9999999-dev https://github.com/ketwaroo/package-infoSort of a reflection tool for composer packages.
MIT
The Requires
- php >=5.4.0
by Yaasir Ketwaroo
php composer introspection
Wallogit.com
2017 © Pedro Peláez
Sort of a reflection tool for composer packages.
This is sort of a reflection tool for the composer package we're working in., (*1)
Most common usage would be if you need to determine the base path of your package. Or if you have a project that spans multiple sub packages., (*2)
namespace Vendor/Package; use Ketwaroo/PackageInfo class SomeClass{ public function readStaticCsvData(){ // say you need to read some data located in /vendor/package/data/mydata.csv; // instead of mucking about with relative paths, $root = PackageInfo::whereAmI($this); $csv = file($root.'/data/mydata.csv'); // ..etc } }
unit tests. maybe. figure out what else this could be useful for., (*3)
Sort of a reflection tool for composer packages.
MIT
php composer introspection