示例#1
0
 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;
 }
示例#2
0
 /**
  * @param \Exception $exception
  */
 private function _fail(\Exception $exception)
 {
     Debug::log('fail :(');
     Debug::log($exception->getTraceAsString(), sprintf("%s::getMessage(): %s", get_class($exception), $exception->getMessage()));
 }
示例#3
0
 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);
     //        }
 }
示例#4
0
 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);
     }
 }