1. Go to this page and download the library: Download phizzl/deployee 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/ */
phizzl / deployee example snippets
use Deployee\Container;
use Deployee\Plugins\AbstractPlugin;
class MyPluginPlugin extends AbstractPlugin
{
const PLUGIN_ID = "deploy.myUniquePluginId";
/**
* @return string
*/
public function getPluginId()
{
return self::PLUGIN_ID;
}
/**
* @param Container $container
*/
public function initialize(Container $container)
{
// start subscribing to events
}
}
public function initialize(Container $container)
{
$myvar1 = $this->config['myvar1'];
if(!isset($this->config['myvar2']) || !is_array($this->config['myvar2'])){
throw new \RuntimeException("You need to configure myvar2");
}
}