コード例 #1
0
ファイル: Row.php プロジェクト: rainner/biscuit-php
 /**
  * Resolves a file size into human-readable format
  */
 public function resolveSize($row = array(), $column = '')
 {
     if (!empty($column) && array_key_exists($column, $row)) {
         $row[$column] = Numeric::toSize($row[$column]);
     }
     return $row;
 }
コード例 #2
0
ファイル: File.php プロジェクト: rainner/biscuit-php
 /**
  * Get file size in human readable format
  */
 public function getByteSite()
 {
     return Numeric::toSize($this->getSize());
 }
コード例 #3
0
ファイル: Folder.php プロジェクト: rainner/biscuit-php
 /**
  * Get folder size in human readable format
  */
 public function getByteSite($recursive = false)
 {
     $bytes = $recursive ? $this->getRecursiveSize() : $this->getSize();
     return Numeric::toSize($bytes);
 }
コード例 #4
0
ファイル: Debugger.php プロジェクト: rainner/biscuit-php
 /**
  * Builds and returns error output data for views
  */
 private function _getOutputData($full = true)
 {
     $output = array('status' => $this->_status_code, 'info' => $this->_error_type, 'error' => $this->_error_message, 'file' => $this->_relativePath($this->_error_file), 'line' => $this->_error_line, 'date' => date('r'), 'url' => Server::getUrl(), 'host' => Server::getHost(), 'domain' => Server::getDomain(), 'memory' => Numeric::toSize(memory_get_peak_usage(true)), 'speed' => $this->_getRuntimeSpeed());
     if ($full === true) {
         $output['headers'] = getallheaders();
         if (!empty($this->_error_backtrace)) {
             $output['trace'] = $this->_getBacktrace();
         }
         if (!empty($this->_error_file) && !empty($this->_error_line)) {
             $output['source'] = $this->_getSourceCode($this->_error_file, $this->_error_line);
         }
     }
     return $output;
 }