DataSift\Storyplayer\PlayerLib\Action_LogItem::addStep PHP Метод

addStep() публичный Метод

public addStep ( string $text, callback $callable ) : mixed
$text string the message to write
$callable callback the function / lambda to call
Результат mixed
    public function addStep($text, $callable)
    {
        // make sure any nested action has completed
        $this->closeAllOpenSubActions();
        // create a log item for this step
        $action = $this->newNestedAction();
        $action->startAction($text);
        // call the callback
        $return = $callable($action);
        // mark this action as complete
        $action->endAction();
        unset($this->nestedAction);
        // all done
        return $return;
    }