<?php
require_once 'CommandInterface.php';
require_once 'CommandList.php';
class JobCommand implements CommandInterface
{
public function execute(Context $context)
{
if ($context->getCurrentCommand() !== 'begin') {
throw new RuntimeException('illegal command [' . $context->getCurrentCommand() . '].');
}
$commandList = new CommandList();
$commandList->execute($context->next());
}
}