lib/models/DataInterfaceLog.php
public function end($endInterrupted = false, $saveAlways = true)
    {
        $this->getStatusLog(true);
        if (!is_null($this->ended)) {
            if ($saveAlways) {
                $this->save();
            }

            return true;
        }
        if ($endInterrupted) {
            $lerror = error_get_last();
            if (!empty($lerror)) {
                $this->statusLog->addError("{$lerror['file']}:{$lerror['line']} {$lerror['message']}");
            }
            $this->status = 'interrupted';
        } elseif ($this->statusLog->hasError) {
            $this->status = 'failed';
        } else {
            $this->status = 'success';
        }
        $this->ended = date("Y-m-d G:i:s");

        return $this->save();
    }
public function end($endInterrupted = false, $saveAlways = true)
    {
        $this->getStatusLog(true);
        if (!is_null($this->ended)) {
            if ($saveAlways) {
                $this->save();
            }

            return true;
        }
        if ($endInterrupted) {
            $lerror = error_get_last();
            if (!empty($lerror)) {
                $this->statusLog->addError("{$lerror['file']}:{$lerror['line']} {$lerror['message']}");
            }
            $this->status = 'interrupted';
        } elseif ($this->statusLog->hasError) {
            $this->status = 'failed';
        } else {
            $this->status = 'success';
        }
        $this->ended = date("Y-m-d G:i:s");

        return $this->save();
    }
public function end ( $ endInterrupted = false , $ saveAlways = true ) { $ this -> getStatusLog ( true ) ; if ( ! is_null ( $ this -> ended ) ) { if ( $ saveAlways ) { $ this -> save ( ) ; } return true ; } if ( $ endInterrupted ) { $ lerror = error_get_last ( ) ; if ( ! empty ( $ lerror ) ) { $ this -> statusLog -> addError ( "{$lerror['file']}:{$lerror['line']} {$lerror['message']}" ) ; } $ this -> status = 'interrupted' ; } elseif ( $ this -> statusLog -> hasError ) { $ this -> status = 'failed' ; } else { $ this -> status = 'success' ; } $ this -> ended = date ( "Y-m-d G:i:s" ) ; return $ this -> save ( ) ; }
[[@doctodo method_description:end]].

@param boolean $endInterrupted [[@doctodo param_description:endInterrupted]] [optional]
@param boolean $saveAlways     [[@doctodo param_description:saveAlways]] [optional]

@return [[@doctodo return_type:end]] [[@doctodo return_description:end]]
[[ @doctodo method_description : end ]] .