public function endAction($message = 'done', $color = self::CLIGHT_GREEN) {
        $r = '';
        if (empty($this->currentAction)) {
            return $this->output($r);
        }
        $r .= $this->currentAction['message'];
        $time = $this->timeItTook($this->currentAction['time']);
        $length = ($this->currentActionHadLogs ? 0 : $this->currentAction['length']) + $this->lastTimeLenght + $this->getTextLength(' [' . $message . '] ');
        $spaceLength = $this->getScreen('columns') - $length - 2;
        $r .= ' ';
        if ($spaceLength > 0) {
            $r .= $this->color(str_repeat('.', $spaceLength), self::CDARK_GRAY);
        }
        $r .= $this->color(' [' . $message . '] ', $color) . $this->color($time) . "\n";
        $this->currentAction = null;
        if ($this->pendingActionLogs) {
            $r .= implode("\n", $this->pendingActionLogs) . "\n";
        }
        return $this->output($r);
    }
public function endAction($message = 'done', $color = self::CLIGHT_GREEN) {
        $r = '';
        if (empty($this->currentAction)) {
            return $this->output($r);
        }
        $r .= $this->currentAction['message'];
        $time = $this->timeItTook($this->currentAction['time']);
        $length = ($this->currentActionHadLogs ? 0 : $this->currentAction['length']) + $this->lastTimeLenght + $this->getTextLength(' [' . $message . '] ');
        $spaceLength = $this->getScreen('columns') - $length - 2;
        $r .= ' ';
        if ($spaceLength > 0) {
            $r .= $this->color(str_repeat('.', $spaceLength), self::CDARK_GRAY);
        }
        $r .= $this->color(' [' . $message . '] ', $color) . $this->color($time) . "\n";
        $this->currentAction = null;
        if ($this->pendingActionLogs) {
            $r .= implode("\n", $this->pendingActionLogs) . "\n";
        }
        return $this->output($r);
    }
public function endAction ( $ message = 'done' , $ color = self :: CLIGHT_GREEN ) { $ r = '' ; if ( empty ( $ this -> currentAction ) ) { return $ this -> output ( $ r ) ; } $ r .= $ this -> currentAction [ 'message' ] ; $ time = $ this -> timeItTook ( $ this -> currentAction [ 'time' ] ) ; $ length = ( $ this -> currentActionHadLogs ? 0 : $ this -> currentAction [ 'length' ] ) + $ this -> lastTimeLenght + $ this -> getTextLength ( ' [' . $ message . '] ' ) ; $ spaceLength = $ this -> getScreen ( 'columns' ) - $ length - 2 ; $ r .= ' ' ; if ( $ spaceLength > 0 ) { $ r .= $ this -> color ( str_repeat ( '.' , $ spaceLength ) , self :: CDARK_GRAY ) ; } $ r .= $ this -> color ( ' [' . $ message . '] ' , $ color ) . $ this -> color ( $ time ) . "\n" ; $ this -> currentAction = null ; if ( $ this -> pendingActionLogs ) { $ r .= implode ( "\n" , $ this -> pendingActionLogs ) . "\n" ; } return $ this -> output ( $ r ) ; }
End a started action.
@param string $message
@param string $color
@return string
End a started action .