2017 © Pedro Peláez
 

library package-info

Sort of a reflection tool for composer packages.

image

ketwaroo/package-info

Sort of a reflection tool for composer packages.

  • Sunday, October 4, 2015
  • by ketwaroo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

ketwaroo/package-info

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)

Usage. Of sorts.


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 } }

TODO.

unit tests. maybe. figure out what else this could be useful for., (*3)

The Versions

04/10 2015

dev-master

9999999-dev https://github.com/ketwaroo/package-info

Sort of a reflection tool for composer packages.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Yaasir Ketwaroo

php composer introspection