cylab-be / php-vagrant-cloud
A PHP client for Vagrant Cloud. Allows to download boxes.
0.0.7
2019-11-12 13:26 UTC
Requires
- psr/log: ^1.1
- symfony/process: >=3.4
Requires (Dev)
- monolog/monolog: ^1.24
- phpunit/phpunit: ^8.2
- slevomat/coding-standard: ^5.0
- squizlabs/php_codesniffer: ^3.4
README
A PHP client for Vagrant Cloud. Allows to download vagrant boxes.
Installation
composer require cylab-be/php-vagrant-cloud
Usage
<?php
require_once "./vendor/autoload.php";
$vagrant = new \Cylab\Vagrant\Vagrant();
$path = $vagrant->getOVA("olbat/tiny-core-micro");
// /tmp/php-vagrant/olbat/tiny-core-micro/0.1.0/box.ova
echo $path;
Using a logger (works with any implementation of PSR Logger):
$logger = new \Monolog\Logger("log");
$logger->pushHandler(new \Monolog\Handler\ErrorLogHandler());
$vagrant = new \Cylab\Vagrant\Vagrant("/tmp/php-vagrant", $logger);
$path = $vagrant->getOVA("olbat/tiny-core-micro");
// /tmp/php-vagrant/olbat/tiny-core-micro/0.1.0/box.ova
echo $path;