public static function initialize($step) { Debug::log(sprintf('>>> %s <<<', $step), __METHOD__, $step); $stepClass = "\\Robot\\Step\\{$step}"; $stepInstance = new $stepClass(); if (false === $stepInstance instanceof StepInterface) { throw new \Exception("Etapa '{$step}' não reconhecida. Verifique se a classe implementa a interface StepInterface."); } return $stepInstance; }
/** * @param \Exception $exception */ private function _fail(\Exception $exception) { Debug::log('fail :('); Debug::log($exception->getTraceAsString(), sprintf("%s::getMessage(): %s", get_class($exception), $exception->getMessage())); }
private static function _debug($msg, $tab = TRUE, $label = \Robot\Debug::INFO) { $strTab = $tab ? chr(9) : ''; // if (self::$_debug) { \Robot\Debug::log("ARTEFATO[" . self::$_sqArtefato . "] {$strTab} {$msg}", $label, \Robot\Debug::STEP_MERGE); // } }
private static function _debug($msg, $tab = TRUE, $label = \Robot\Debug::INFO) { $strTab = $tab ? chr(9) : ''; if (self::$_debug) { \Robot\Debug::log("ARTEFATO[" . self::$_sqArtefato . "] {$strTab} {$msg}", $label, self::$_stepCurrent); } }