From 5ac559479a621eb35ff11ab86c529910aed8c052 Mon Sep 17 00:00:00 2001 From: Greg Aker Date: Wed, 10 Nov 2010 14:59:47 -0600 Subject: Changing method visibility in the Profiler class --- system/libraries/Profiler.php | 39 ++++++++++++++------------------------- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/system/libraries/Profiler.php b/system/libraries/Profiler.php index 0b73abd27..4441a9fbe 100644 --- a/system/libraries/Profiler.php +++ b/system/libraries/Profiler.php @@ -34,7 +34,7 @@ class CI_Profiler { var $CI; - var $_available_sections = array( + protected $_available_sections = array( 'benchmarks', 'get', 'memory_usage', @@ -46,7 +46,7 @@ class CI_Profiler { 'config' ); - function CI_Profiler($config = array()) + public function __construct($config = array()) { $this->CI =& get_instance(); $this->CI->load->language('profiler'); @@ -70,11 +70,10 @@ class CI_Profiler { * * Sets the private _compile_* properties to enable/disable Profiler sections * - * @access public * @param mixed * @return void */ - function set_sections($config) + public function set_sections($config) { foreach ($config as $method => $enable) { @@ -94,11 +93,10 @@ class CI_Profiler { * matches any two points that are named identically (ending in "_start" * and "_end" respectively). It then compiles the execution times for * all points and returns it as an array - * @PHP4 - all methods should be declared private - * @access private + * * @return array */ - function _compile_benchmarks() + protected function _compile_benchmarks() { $profile = array(); foreach ($this->CI->benchmark->marker as $key => $val) @@ -142,10 +140,9 @@ class CI_Profiler { /** * Compile Queries * - * @access private * @return string */ - function _compile_queries() + protected function _compile_queries() { $dbs = array(); @@ -224,10 +221,9 @@ class CI_Profiler { /** * Compile $_GET Data * - * @access private * @return string */ - function _compile_get() + protected function _compile_get() { $output = "\n\n"; $output .= '
'; @@ -274,10 +270,9 @@ class CI_Profiler { /** * Compile $_POST Data * - * @access private * @return string */ - function _compile_post() + protected function _compile_post() { $output = "\n\n"; $output .= '
'; @@ -324,10 +319,9 @@ class CI_Profiler { /** * Show query string * - * @access private * @return string */ - function _compile_uri_string() + protected function _compile_uri_string() { $output = "\n\n"; $output .= '
'; @@ -354,10 +348,9 @@ class CI_Profiler { /** * Show the controller and function that were called * - * @access private * @return string */ - function _compile_controller_info() + protected function _compile_controller_info() { $output = "\n\n"; $output .= '
'; @@ -380,10 +373,9 @@ class CI_Profiler { * * Display total used memory * - * @access public * @return string */ - function _compile_memory_usage() + protected function _compile_memory_usage() { $output = "\n\n"; $output .= '
'; @@ -412,10 +404,9 @@ class CI_Profiler { * * Lists HTTP headers * - * @access public * @return string */ - function _compile_http_headers() + protected function _compile_http_headers() { $output = "\n\n"; $output .= '
'; @@ -444,10 +435,9 @@ class CI_Profiler { * * Lists developer config variables * - * @access public * @return string */ - function _compile_config() + protected function _compile_config() { $output = "\n\n"; $output .= '
'; @@ -478,10 +468,9 @@ class CI_Profiler { /** * Run the Profiler * - * @access private * @return string */ - function run() + public function run() { $output = "
"; $fields_displayed = 0; -- cgit v1.2.3-24-g4f1b