protected function _getSourcePath($trace, $fileOnly = false)
    {
        $path         = '';
        $currentTrace = $this->_getLastTrace($trace);

        if (isset($currentTrace['file'])) {
            $path = $this->_getRalativePath($currentTrace['file']);

            if ($fileOnly && $path) {
                $path = pathinfo($path, PATHINFO_BASENAME);
            }

            if (isset($currentTrace['line']) && $path) {
                $path = $path . ':' . $currentTrace['line'];
            }
        }

        if (!$path) {
            $path = 'undefined:0';
        }

        return $path;
    }
protected function _getSourcePath($trace, $fileOnly = false)
    {
        $path         = '';
        $currentTrace = $this->_getLastTrace($trace);

        if (isset($currentTrace['file'])) {
            $path = $this->_getRalativePath($currentTrace['file']);

            if ($fileOnly && $path) {
                $path = pathinfo($path, PATHINFO_BASENAME);
            }

            if (isset($currentTrace['line']) && $path) {
                $path = $path . ':' . $currentTrace['line'];
            }
        }

        if (!$path) {
            $path = 'undefined:0';
        }

        return $path;
    }
protected function _getSourcePath ( $ trace , $ fileOnly = false ) { $ path = '' ; $ currentTrace = $ this -> _getLastTrace ( $ trace ) ; if ( isset ( $ currentTrace [ 'file' ] ) ) { $ path = $ this -> _getRalativePath ( $ currentTrace [ 'file' ] ) ; if ( $ fileOnly && $ path ) { $ path = pathinfo ( $ path , PATHINFO_BASENAME ) ; } if ( isset ( $ currentTrace [ 'line' ] ) && $ path ) { $ path = $ path . ':' . $ currentTrace [ 'line' ] ; } } if ( ! $ path ) { $ path = 'undefined:0' ; } return $ path ; }
Get last source path from backtrace
@param   array $trace    Backtrace
@param   bool  $fileOnly Show filename only
@return  string
Get last source path from backtrace