/** * 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; }
/** * Get file size in human readable format */ public function getByteSite() { return Numeric::toSize($this->getSize()); }
/** * Get folder size in human readable format */ public function getByteSite($recursive = false) { $bytes = $recursive ? $this->getRecursiveSize() : $this->getSize(); return Numeric::toSize($bytes); }
/** * 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; }