From b04f0a5f70ed79d45e254d7b6db61f6fc1f484f5 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Fri, 13 May 2011 10:49:53 -0400 Subject: [PATCH] [feature/template-engine] Delete @access everywhere. Access specification in php 5 is done directly on functions/properties. PHPBB3-9726 --- phpBB/includes/template.php | 17 ----------------- phpBB/includes/template/compile.php | 12 ------------ phpBB/includes/template/context.php | 7 ------- 3 files changed, 36 deletions(-) diff --git a/phpBB/includes/template.php b/phpBB/includes/template.php index f2b1cccd2c..5fb0f41311 100644 --- a/phpBB/includes/template.php +++ b/phpBB/includes/template.php @@ -35,7 +35,6 @@ class phpbb_template /** * @var phpbb_template_context Template context. * Stores template data used during template rendering. - * @access private */ private $context; @@ -101,7 +100,6 @@ class phpbb_template /** * Set template location - * @access public */ public function set_template() { @@ -138,7 +136,6 @@ class phpbb_template * * Note: Templates are still compiled to phpBB's cache directory. * - * @access public * @param string $template_path Path to template directory * @param string $template_name Name of template * @param string $fallback_template_path Path to fallback template @@ -177,7 +174,6 @@ class phpbb_template /** * Sets the template filenames for handles. $filename_array * should be a hash of handle => filename pairs. - * @access public * @param array $filname_array Should be a hash of handle => filename pairs. */ public function set_filenames(array $filename_array) @@ -203,7 +199,6 @@ class phpbb_template /** * Clears all variables and blocks assigned to this template. - * @access public */ public function destroy() { @@ -212,7 +207,6 @@ class phpbb_template /** * Reset/empty complete block - * @access public * @param string $blockname Name of block to destroy */ public function destroy_block_vars($blockname) @@ -222,7 +216,6 @@ class phpbb_template /** * Display handle - * @access public * @param string $handle Handle to display * @param bool $include_once Allow multiple inclusions * @return bool True on success, false on failure @@ -290,7 +283,6 @@ class phpbb_template /** * Display the handle and assign the output to a template variable or return the compiled result. - * @access public * @param string $handle Handle to operate on * @param string $template_var Template variable to assign compiled handle to * @param bool $return_content If true return compiled handle, otherwise assign to $template_var @@ -335,7 +327,6 @@ class phpbb_template * contents sent to the output stream (unless, of course, output * buffering is in effect). * - * @access private * @param string $handle Handle of the template to load * @return phpbb_template_renderer Template renderer object, or null on failure * @uses template_compile is used to compile template source @@ -407,7 +398,6 @@ class phpbb_template /** * Resolves template handle $handle to source file path. - * @access private * @param string $handle Template handle (i.e. "friendly" template name) * @return string Source file path */ @@ -431,7 +421,6 @@ class phpbb_template /** * Determines compiled file path for handle $handle. - * @access private * @param string $handle Template handle (i.e. "friendly" template name) * @return string Compiled file path */ @@ -443,7 +432,6 @@ class phpbb_template /** * Assign key variable pairs from an array - * @access public * @param array $vararray A hash of variable name => value pairs */ public function assign_vars(array $vararray) @@ -456,7 +444,6 @@ class phpbb_template /** * Assign a single variable to a single key - * @access public * @param string $varname Variable name * @param string $varval Value to assign to variable */ @@ -468,7 +455,6 @@ class phpbb_template // Docstring is copied from phpbb_template_context method with the same name. /** * Assign key variable pairs from an array to a specified block - * @access public * @param string $blockname Name of block to assign $vararray to * @param array $vararray A hash of variable name => value pairs */ @@ -504,7 +490,6 @@ class phpbb_template * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) * * @return bool false on error, true on success - * @access public */ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert') { @@ -513,7 +498,6 @@ class phpbb_template /** * Include a separate template - * @access public * @param string $filename Template filename to include * @param bool $include True to include the file, false to just load it * @uses template_compile is used to compile uncached templates @@ -543,7 +527,6 @@ class phpbb_template /** * Include a php-file - * @access public */ public function _php_include($filename) { diff --git a/phpBB/includes/template/compile.php b/phpBB/includes/template/compile.php index 46a30d26d3..79a7d784cd 100644 --- a/phpBB/includes/template/compile.php +++ b/phpBB/includes/template/compile.php @@ -260,7 +260,6 @@ class phpbb_template_filter extends php_user_filter /** * Compile variables - * @access private */ private function compile_var_tags(&$text_blocks) { @@ -310,7 +309,6 @@ class phpbb_template_filter extends php_user_filter /** * Compile blocks - * @access private */ private function compile_tag_block($tag_args) { @@ -423,7 +421,6 @@ class phpbb_template_filter extends php_user_filter /** * Compile a general expression - much of this is from Smarty with * some adaptions for our block level methods - * @access private */ private function compile_expression($tag_args) { @@ -630,7 +627,6 @@ class phpbb_template_filter extends php_user_filter /** * Compile DEFINE tags - * @access private */ private function compile_tag_define($tag_args, $op) { @@ -654,7 +650,6 @@ class phpbb_template_filter extends php_user_filter /** * Compile INCLUDE tag - * @access private */ private function compile_tag_include($tag_args) { @@ -663,7 +658,6 @@ class phpbb_template_filter extends php_user_filter /** * Compile INCLUDE_PHP tag - * @access private */ private function compile_tag_include_php($tag_args) { @@ -673,7 +667,6 @@ class phpbb_template_filter extends php_user_filter /** * parse expression * This is from Smarty - * @access private */ private function _parse_is_expr($is_arg, $tokens) { @@ -752,7 +745,6 @@ class phpbb_template_filter extends php_user_filter * ' . $_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['varname'] . ' * It's ready to be inserted into an "echo" line in one of the templates. * - * @access private * @param string $namespace Namespace to access (expects a trailing "." on the namespace) * @param string $varname Variable name to use * @param bool $echo If true return an echo statement, otherwise a reference to the internal variable @@ -815,7 +807,6 @@ class phpbb_template_filter extends php_user_filter * (possibly nested) block namespace. This is a string of the form: * $_tpldata['parent'][$_parent_i]['$child1'][$_child1_i]['$child2'][$_child2_i]...['$childN'] * - * @access private * @param string $blockname Block to access (does not expect a trailing "." on the blockname) * @param bool $include_last_iterator If $include_last_iterator is true, then [$_childN_i] will be appended to the form shown above. * @param bool $defop If true this is a variable created with the DEFINE construct, otherwise template variable @@ -883,7 +874,6 @@ class phpbb_template_compile /** * Compiles template in $source_file and writes compiled template to * cache directory - * @access public * @param string $handle Template handle to compile * @param string $source_file Source template file * @return bool Return true on success otherwise false @@ -916,7 +906,6 @@ class phpbb_template_compile /** * Compiles a template located at $source_file. * Returns PHP source suitable for eval(). - * @access public * @param string $source_file Source template file * @return string|bool Return compiled code on successful compilation otherwise false */ @@ -947,7 +936,6 @@ class phpbb_template_compile * A stream filter is appended to $source_stream as part of the * process. * - * @access private * @param resource $source_stream Source stream * @param resource $dest_stream Destination stream * @return void diff --git a/phpBB/includes/template/context.php b/phpBB/includes/template/context.php index 73f1373655..3c0dceb981 100644 --- a/phpBB/includes/template/context.php +++ b/phpBB/includes/template/context.php @@ -45,7 +45,6 @@ class phpbb_template_context /** * Clears template data set. - * @access public */ public function clear() { @@ -55,7 +54,6 @@ class phpbb_template_context /** * Assign a single variable to a single key - * @access public * @param string $varname Variable name * @param string $varval Value to assign to variable */ @@ -74,7 +72,6 @@ class phpbb_template_context * * Note: modifying returned array will affect data stored in the context. * - * @access public * @return array template data */ public function get_data_ref() @@ -93,7 +90,6 @@ class phpbb_template_context * * Note: modifying returned array will affect data stored in the context. * - * @access public * @return array template data */ public function get_root_ref() @@ -104,7 +100,6 @@ class phpbb_template_context /** * Assign key variable pairs from an array to a specified block - * @access public * @param string $blockname Name of block to assign $vararray to * @param array $vararray A hash of variable name => value pairs */ @@ -197,7 +192,6 @@ class phpbb_template_context * and inserting at position 1 will result in this array: array(first positioned array, vararray, following vars) * * @return bool false on error, true on success - * @access public */ public function alter_block_array($blockname, array $vararray, $key = false, $mode = 'insert') { @@ -315,7 +309,6 @@ class phpbb_template_context /** * Reset/empty complete block - * @access public * @param string $blockname Name of block to destroy */ public function destroy_block_vars($blockname)