PHP code example of fastframe / composer-packages
1. Go to this page and download the library: Download fastframe/composer-packages library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
fastframe / composer-packages example snippets
$container = new FastFrame\Composer\Packages\Container();
$container->has('fastframe/composer-packages'); // true
$container->has('non-existent/package'); // false
$pkg = $container->get('fastframe/composer-packages'); // Package object
// Package object
$pkg->name(); // fastframe/composer-packages
$pkg->type(); // composer-plugin
$pkg->version(); // 1.0.0.0
$pkg->path(); // {root_path}/vendor/fastframe/composer-packages
$pkg->extra(); // array('class' => 'FastFrame\\Composer\\Packages\\Plugin')
$pkg->composerJson(); // the json decoded composer.json contents from the package
// finding all packages of a specific type
$composer_plugins = $container->getByType('composer-plugins'); // array('fastframe-composer-packages')