, (*1)
Parses composer.lock and returns informations about the used packages, (*2)
Usage
Mainly developed for Laravel, but can still be used in all other Frameworks or Vanilla PHP applications., (*3)
-
Add service provider to app.config, (*4)
'Ipunkt\ComposerAbout\ComposerAboutServiceProvider',
, (*5)
-
Use it in your routes.php or Controller action, (*6)
/** @var \Ipunkt\ComposerAbout\Structure\ComposerStructure $composerAbout */
, (*7)
$composerAbout = App::make('composer-about');
, (*8)
API
ComposerStructure::$hash
Hash of the current installed packages., (*9)
ComposerStructure::$packages
A Collection of Package object instances for the packages used., (*10)
ComposerStructure::$devpackages
A Collection of Package object instances for the dev packages used., (*11)
ComposerStructure::licenses()
An array of all unique licenses for all required packages. Perhaps for a summary of used licenses. Can be very useful,
if you want to check, that there is a defined license that you do not want to have., (*12)
Package
For current methods please see Ipunkt\ComposerAbout\Structure\Data\Package.php
, (*13)
Package::getName()
Returns the name of the package., (*14)
Package::getVersion()
Returns the version of the package., (*15)
Package::getDescription()
Returns the description of the package., (*16)
Package::getAuthors()
Returns an array of alle Authors...each author has 'name' and 'email' set, if possible., (*17)
Package::getLicenses()
Returns the licenses of the package., (*18)
Package::getType()
Returns the type of the package. E.g. library, (*19)
Package::getName()
Returns the name of the package., (*20)