public function doPhase($script)
{
// shorthand
$st = $this->st;
$scriptResult = $script->getResult();
// keep track of what happens with the action
$phaseResult = $this->getNewPhaseResult();
// run ONE of the actions, picked at random
try {
// run the script
include $script->getFilename();
// if we get here, all is well
$phaseResult->setContinuePlaying();
$scriptResult->setPhaseGroupHasSucceeded();
} catch (E5xx_ActionFailed $e) {
$phaseResult->setPlayingFailed($phaseResult::FAILED, $e->getMessage(), $e);
$scriptResult->setPhaseGroupHasFailed($phaseResult);
} catch (E5xx_ExpectFailed $e) {
$phaseResult->setPlayingFailed($phaseResult::FAILED, $e->getMessage(), $e);
$scriptResult->setPhaseGroupHasFailed($phaseResult);
} catch (E5xx_NotImplemented $e) {
$phaseResult->setPlayingFailed($phaseResult::INCOMPLETE, $e->getMessage(), $e);
$scriptResult->setPhaseGroupIsIncomplete($phaseResult);
} catch (Exception $e) {
$phaseResult->setPlayingFailed($phaseResult::ERROR, $e->getMessage(), $e);
$scriptResult->setPhaseGroupHasError($phaseResult);
}
// close off any open log actions
$st->closeAllOpenActions();
// all done
return $phaseResult;
}