1. Go to this page and download the library: Download kitpages/chain-bundle 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/ */
kitpages / chain-bundle example snippets
namespace Kitpages\ChainBundle\Tests\Sample;
use Kitpages\ChainBundle\Step\StepAbstract;
class StepSample extends StepAbstract
{
public function execute() {
// do whatever you want
return $whatever;
}
}
namespace Foo\Bar;
class StepListener
{
public function onStepExecute(StepEvent $event)
{
$step = $event->getStep();
// do whatever you want with the current step
// $event->preventDefault();
// $event->stopPropagation();
// log something ?
}
}
php
$bundles = array(
...
new Kitpages\ChainBundle\KitpagesChainBundle(),
);
bash
# lancer une stepe avec les paramètres du config.yml
php app/console kitpages:chain:run-step CodeCopy
# lancer une stepe en écrasant des paramètres du config.yml
php app/console kitpages:chain:run-step CodeCopy --p=src_dir:'/home/webadmin/src' --p=dest_dir:'/tmp/destDir'