for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kaliop\eZMigrationBundle\Core\Executor;
use Kaliop\eZMigrationBundle\API\Exception\InvalidStepDefinitionException;
use Kaliop\eZMigrationBundle\API\Value\MigrationStep;
use Kaliop\eZMigrationBundle\API\ExecutorInterface;
abstract class AbstractExecutor implements ExecutorInterface
{
/// @todo not all subclasses of this do set references. We should move the trait to a dedicated subcalss
use ReferenceSetterTrait;
protected $supportedStepTypes = array();
public function supportedTypes()
return $this->supportedStepTypes;
}
/**
* IT IS MANDATORY TO OVERRIDE THIS IN SUBCLASSES
* @param MigrationStep $step
* @return mixed
* @throws InvalidStepDefinitionException
*/
public function execute(MigrationStep $step)
if (!in_array($step->type, $this->supportedStepTypes)) {
throw new InvalidStepDefinitionException("Something is wrong! Executor can not work on step of type '{$step->type}'");