many more phpdoc comment upgrades

This commit is contained in:
cellog
2003-02-16 05:09:19 +00:00
parent 43757d1c53
commit abc335673f
5 changed files with 591 additions and 620 deletions

View File

@@ -1,3 +1,10 @@
2003-02-15 Greg Beaver <cellog@sourceforge.net>
* Smarty.class.php
Smarty_Compiler.class.php
continue cleaning of phpdoc comments. All that is needed is the
addition of @return tags and perhaps a bit more verbose comments
and they are finished.
2003-02-14 Monte Ohrt <monte@ispi.net> 2003-02-14 Monte Ohrt <monte@ispi.net>
* NEWS * NEWS

View File

@@ -928,8 +928,8 @@ class Smarty
* test to see if valid cache exists for this template * test to see if valid cache exists for this template
* *
* @param string $tpl_file name of template file * @param string $tpl_file name of template file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
*/ */
function is_cached($tpl_file, $cache_id = null, $compile_id = null) function is_cached($tpl_file, $cache_id = null, $compile_id = null)
{ {
@@ -957,9 +957,9 @@ class Smarty
* or all compiled template files if one is not specified. * or all compiled template files if one is not specified.
* This function is for advanced use only, not normally needed. * This function is for advanced use only, not normally needed.
* *
* @param $tpl_file * @param string $tpl_file
* @param $compile_id * @param string $compile_id
* @param $exp_time * @param string $exp_time
*/ */
function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
{ {
@@ -971,7 +971,7 @@ class Smarty
/** /**
* Checks whether requested template exists. * Checks whether requested template exists.
* *
* @param $tpl_file * @param string $tpl_file
*/ */
function template_exists($tpl_file) function template_exists($tpl_file)
{ {
@@ -981,6 +981,7 @@ class Smarty
/** /**
* Returns an array containing template variables * Returns an array containing template variables
* *
* @return array
*/ */
function &get_template_vars() function &get_template_vars()
{ {
@@ -991,8 +992,8 @@ class Smarty
/** /**
* trigger Smarty error * trigger Smarty error
* *
* @param $error_msg * @param string $error_msg
* @param $error_type * @param integer $error_type
*/ */
function trigger_error($error_msg, $error_type = E_USER_WARNING) function trigger_error($error_msg, $error_type = E_USER_WARNING)
{ {
@@ -1003,9 +1004,9 @@ class Smarty
/** /**
* executes & displays the template results * executes & displays the template results
* *
* @param $tpl_file * @param string $tpl_file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
*/ */
function display($tpl_file, $cache_id = null, $compile_id = null) function display($tpl_file, $cache_id = null, $compile_id = null)
{ {
@@ -1015,10 +1016,10 @@ class Smarty
/** /**
* executes & returns or displays the template results * executes & returns or displays the template results
* *
* @param $_smarty_tpl_file * @param string $_smarty_tpl_file
* @param $_smarty_cache_id * @param string $_smarty_cache_id
* @param $_smarty_compile_id * @param string $_smarty_compile_id
* @param $_smarty_display * @param boolean $_smarty_display
*/ */
function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false) function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false)
{ {
@@ -1152,8 +1153,6 @@ class Smarty
/** /**
* assign $smarty interface variable * assign $smarty interface variable
*
* @access public
*/ */
function _assign_smarty_interface() function _assign_smarty_interface()
{ {
@@ -1181,8 +1180,8 @@ class Smarty
/** /**
* generate debug output * generate debug output
* * @return string debug.tpl template output
* @access public * @uses $debug_tpl debug template, used to display debugging output
*/ */
function _generate_debug_output() function _generate_debug_output()
{ {
@@ -1228,10 +1227,9 @@ class Smarty
/** /**
* load configuration values * load configuration values
* *
* @access public * @param string $file
* @param $file * @param string $section
* @param $section * @param string $scope
* @param $scope
*/ */
function config_load($file, $section = null, $scope = 'global') function config_load($file, $section = null, $scope = 'global')
{ {
@@ -1326,8 +1324,8 @@ class Smarty
/** /**
* determines if a resource is trusted or not * determines if a resource is trusted or not
* *
* @param $resource_type * @param string $resource_type
* @param $resource_name * @param string $resource_name
*/ */
function _is_trusted($resource_type, $resource_name) function _is_trusted($resource_type, $resource_name)
{ {
@@ -1361,8 +1359,8 @@ class Smarty
/** /**
* determines if a resource is secure or not. * determines if a resource is secure or not.
* *
* @param $resource_type * @param string $resource_type
* @param $resource_name * @param string $resource_name
*/ */
function _is_secure($resource_type, $resource_name) function _is_secure($resource_type, $resource_name)
{ {
@@ -1395,8 +1393,9 @@ class Smarty
/** /**
* Retrieves PHP script resource * Retrieves PHP script resource
* *
* @param $resource * sets $php_resource to the returned resource
* @param $resource_type * @param string $resource
* @param string $resource_type
* @param $php_resource * @param $php_resource
*/ */
function _get_php_resource($resource, &$resource_type, &$php_resource) function _get_php_resource($resource, &$resource_type, &$php_resource)
@@ -1457,8 +1456,8 @@ class Smarty
/** /**
* umm... process the template * umm... process the template
* *
* @param $tpl_file * @param string $tpl_file
* @param $compile_path * @param string $compile_path
*/ */
function _process_template($tpl_file, $compile_path) function _process_template($tpl_file, $compile_path)
{ {
@@ -1498,8 +1497,7 @@ class Smarty
/** /**
* Get the compile path for this template file * Get the compile path for this template file
* *
* @access private * @param string $tpl_file
* @param $tpl_file
*/ */
function _get_compile_path($tpl_file) function _get_compile_path($tpl_file)
{ {
@@ -1510,9 +1508,10 @@ class Smarty
/** /**
* write the compiled template * write the compiled template
* *
* @param $compile_path * @param string $compile_path
* @param $template_compiled * @param string $template_compiled
* @param $template_timestamp * @param integer $template_timestamp
* @return true
*/ */
function _write_compiled_template($compile_path, $template_compiled, $template_timestamp) function _write_compiled_template($compile_path, $template_compiled, $template_timestamp)
{ {
@@ -1525,10 +1524,10 @@ class Smarty
/** /**
* parse out the type and name from the template resource * parse out the type and name from the template resource
* *
* @param $file_base_path * @param string $file_base_path
* @param $file_path * @param string $file_path
* @param $resource_type * @param string $resource_type
* @param $resource_name * @param string $resource_name
*/ */
function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name) function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name)
{ {
@@ -1576,11 +1575,13 @@ class Smarty
* fetch the template info. Gets timestamp, and source * fetch the template info. Gets timestamp, and source
* if get_source is true * if get_source is true
* *
* @param $tpl_path * sets $template_source to the source of the template, and
* @param $template_source * $template_timestamp to its time stamp
* @param $template_timestamp * @param string $tpl_path
* @param $get_source * @param string $template_source
* @param $quiet * @param integer $template_timestamp
* @param boolean $get_source
* @param boolean $quiet
*/ */
function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false) function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false)
{ {
@@ -1641,9 +1642,10 @@ class Smarty
/** /**
* called to compile the templates * called to compile the templates
* *
* @param $tpl_file * sets $template_compiled to the compiled template
* @param $template_source * @param string $tpl_file
* @param $template_compiled * @param string $template_source
* @param string $template_compiled
*/ */
function _compile_template($tpl_file, $template_source, &$template_compiled) function _compile_template($tpl_file, $template_source, &$template_compiled)
{ {
@@ -1686,8 +1688,8 @@ class Smarty
/** /**
* called for included templates * called for included templates
* *
* @param $_smarty_include_tpl_file * @param string $_smarty_include_tpl_file
* @param $_smarty_include_vars * @param string $_smarty_include_vars
*/ */
function _smarty_include($_smarty_include_tpl_file, $_smarty_include_vars) function _smarty_include($_smarty_include_tpl_file, $_smarty_include_vars)
{ {
@@ -1729,9 +1731,12 @@ class Smarty
/** /**
* called for included templates * called for included templates
* *
* @param $_smarty_include_php_file * @param string $_smarty_include_php_file
* @param $_smarty_assign * @param string $_smarty_assign variable to assign the included template's
* @param $_smarty_once * output into
* @param boolean $_smarty_once uses include_once if this is true
* @param array $_smarty_include_vars associative array of vars from
* {include file="blah" var=$var}
*/ */
function _smarty_include_php($_smarty_include_php_file, $_smarty_assign, $_smarty_once, $_smarty_include_vars) function _smarty_include_php($_smarty_include_php_file, $_smarty_assign, $_smarty_once, $_smarty_include_vars)
{ {
@@ -1770,7 +1775,7 @@ class Smarty
/** /**
* clear configuration values * clear configuration values
* *
* @param $var * @param string $var
*/ */
function clear_config($var = null) function clear_config($var = null)
{ {
@@ -1787,7 +1792,7 @@ class Smarty
/** /**
* Replace cached inserts with the actual results * Replace cached inserts with the actual results
* *
* @param $results * @param string $results
*/ */
function _process_cached_inserts($results) function _process_cached_inserts($results)
{ {
@@ -1837,7 +1842,7 @@ class Smarty
/** /**
* Handle insert tags * Handle insert tags
* *
* @param $args * @param array $args
*/ */
function _run_insert_handler($args) function _run_insert_handler($args)
{ {
@@ -1915,8 +1920,7 @@ function _run_insert_handler($args)
/** /**
* Remove starting and ending quotes from the string * Remove starting and ending quotes from the string
* *
* @access private * @param string $string
* @param $string
*/ */
function _dequote($string) function _dequote($string)
{ {
@@ -1932,9 +1936,9 @@ function _run_insert_handler($args)
* read in a file from line $start for $lines. * read in a file from line $start for $lines.
* read the entire file if $start and $lines are null. * read the entire file if $start and $lines are null.
* *
* @param $filename * @param string $filename
* @param $start * @param integer $start
* @param $lines * @param integer $lines
*/ */
function _read_file($filename, $start=null, $lines=null) function _read_file($filename, $start=null, $lines=null)
{ {
@@ -1974,9 +1978,9 @@ function _run_insert_handler($args)
/** /**
* write out a file to disk * write out a file to disk
* *
* @param $filename * @param string $filename
* @param $contents * @param string $contents
* @param $create_dirs * @param boolean $create_dirs
*/ */
function _write_file($filename, $contents, $create_dirs = false) function _write_file($filename, $contents, $create_dirs = false)
{ {
@@ -2003,9 +2007,9 @@ function _run_insert_handler($args)
/** /**
* get a concrete filename for automagically created content * get a concrete filename for automagically created content
* *
* @param $auto_base * @param string $auto_base
* @param $auto_source * @param string $auto_source
* @param $auto_id * @param string $auto_id
*/ */
function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null) function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
{ {
@@ -2057,10 +2061,10 @@ function _run_insert_handler($args)
/** /**
* delete an automagically created file by name and id * delete an automagically created file by name and id
* *
* @param $auto_base * @param string $auto_base
* @param $auto_source * @param string $auto_source
* @param $auto_id * @param string $auto_id
* @param $exp_time * @param integer $exp_time
*/ */
function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null) function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null)
{ {
@@ -2096,9 +2100,9 @@ function _run_insert_handler($args)
* delete a dir recursively (level=0 -> keep root) * delete a dir recursively (level=0 -> keep root)
* WARNING: no tests, it will try to remove what you tell it! * WARNING: no tests, it will try to remove what you tell it!
* *
* @param $dirname * @param string $dirname
* @param $level * @param integer $level
* @param $exp_time * @param integer $exp_time
*/ */
function _rmdir($dirname, $level = 1, $exp_time = null) function _rmdir($dirname, $level = 1, $exp_time = null)
{ {
@@ -2131,8 +2135,8 @@ function _run_insert_handler($args)
/** /**
* unlink a file, possibly using expiration time * unlink a file, possibly using expiration time
* *
* @param $resource * @param string $resource
* @param $exp_time * @param integer $exp_time
*/ */
function _unlink($resource, $exp_time = null) function _unlink($resource, $exp_time = null)
{ {
@@ -2148,7 +2152,7 @@ function _run_insert_handler($args)
/** /**
* create full directory structure * create full directory structure
* *
* @param $dir * @param string $dir
*/ */
function _create_dir_structure($dir) function _create_dir_structure($dir)
{ {
@@ -2194,10 +2198,10 @@ function _run_insert_handler($args)
* Prepend the cache information to the cache file * Prepend the cache information to the cache file
* and write it * and write it
* *
* @param $tpl_file * @param string $tpl_file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
* @param $results * @param string $results
*/ */
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results) function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
{ {
@@ -2238,9 +2242,9 @@ function _run_insert_handler($args)
* regenerated or not * regenerated or not
* *
* @param string $tpl_file * @param string $tpl_file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
* @param $results * @param string $results
*/ */
function _read_cache_file($tpl_file, $cache_id, $compile_id, &$results) function _read_cache_file($tpl_file, $cache_id, $compile_id, &$results)
{ {
@@ -2325,8 +2329,8 @@ function _run_insert_handler($args)
/** /**
* get filepath of requested plugin * get filepath of requested plugin
* *
* @param $type * @param string $type
* @param $name * @param string $name
*/ */
function _get_plugin_filepath($type, $name) function _get_plugin_filepath($type, $name)
{ {
@@ -2369,7 +2373,7 @@ function _run_insert_handler($args)
/** /**
* Load requested plugins * Load requested plugins
* *
* @param $plugins * @param array $plugins
*/ */
function _load_plugins($plugins) function _load_plugins($plugins)
{ {
@@ -2480,7 +2484,7 @@ function _run_insert_handler($args)
/** /**
* load a resource plugin * load a resource plugin
* *
* @param $type * @param string $type
*/ */
function _load_resource_plugin($type) function _load_resource_plugin($type)
{ {
@@ -2540,7 +2544,6 @@ function _run_insert_handler($args)
/** /**
* automatically load a set of filters * automatically load a set of filters
*
*/ */
function _autoload_filters() function _autoload_filters()
{ {
@@ -2554,7 +2557,7 @@ function _run_insert_handler($args)
/** /**
* Quote subpattern references * Quote subpattern references
* *
* @param $string * @param string $string
*/ */
function quote_replace($string) function quote_replace($string)
{ {
@@ -2565,9 +2568,12 @@ function _run_insert_handler($args)
/** /**
* trigger Smarty plugin error * trigger Smarty plugin error
* *
* @param $error_msg * @param string $error_msg
* @param $tpl_file * @param string $tpl_file
* @param $tpl_line * @param integer $tpl_line
* @param string $file
* @param integer $line
* @param integer $error_type
*/ */
function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null, function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null,
$file = null, $line = null, $error_type = E_USER_ERROR) $file = null, $line = null, $error_type = E_USER_ERROR)
@@ -2587,7 +2593,7 @@ function _run_insert_handler($args)
/** /**
* Get seconds and microseconds * Get seconds and microseconds
* * @return double
*/ */
function _get_microtime() function _get_microtime()
{ {
@@ -2600,8 +2606,8 @@ function _run_insert_handler($args)
/** /**
* Get path to file from include_path * Get path to file from include_path
* *
* @param $file_path * @param string $file_path
* @param $new_file_path * @param string $new_file_path
*/ */
function _get_include_path($file_path, &$new_file_path) function _get_include_path($file_path, &$new_file_path)
{ {

View File

@@ -3,11 +3,6 @@
/** /**
* Project: Smarty: the PHP compiling template engine * Project: Smarty: the PHP compiling template engine
* File: Smarty_Compiler.class.php * File: Smarty_Compiler.class.php
* Author: Monte Ohrt <monte@ispi.net>
* Andrei Zmievski <andrei@php.net>
*
* Version: 2.4.2
* Copyright: 2001,2002 ispi of Lincoln, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@@ -35,12 +30,20 @@
* *
* The latest version of Smarty can be obtained from: * The latest version of Smarty can be obtained from:
* http://www.phpinsider.com/ * http://www.phpinsider.com/
* * @link http://www.phpinsider.com/
* @author Monte Ohrt <monte@ispi.net>
* @author Andrei Zmievski <andrei@php.net>
* @version 2.4.2
* @copyright 2001,2002 ispi of Lincoln, Inc.
* @package Smarty
*/ */
class Smarty_Compiler extends Smarty { class Smarty_Compiler extends Smarty {
// internal vars // internal vars
/**#@+
* @access private
*/
var $_sectionelse_stack = array(); // keeps track of whether section had 'else' part var $_sectionelse_stack = array(); // keeps track of whether section had 'else' part
var $_foreachelse_stack = array(); // keeps track of whether foreach had 'else' part var $_foreachelse_stack = array(); // keeps track of whether foreach had 'else' part
var $_literal_blocks = array(); // keeps literal template blocks var $_literal_blocks = array(); // keeps literal template blocks
@@ -69,11 +72,9 @@ class Smarty_Compiler extends Smarty {
var $_obj_start_regexp = null; var $_obj_start_regexp = null;
var $_obj_params_regexp = null; var $_obj_params_regexp = null;
var $_obj_call_regexp = null; var $_obj_call_regexp = null;
/**#@-*/
/** /**
* The class constructor. * The class constructor.
*
* @access public
*/ */
function Smarty_Compiler() function Smarty_Compiler()
{ {
@@ -198,10 +199,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile a template file * compile a template file
* *
* @access public * sets $template_compiled to the compiled source
* @param $tpl_file * @param string $tpl_file
* @param $template_source * @param string $template_source
* @param $template_compiled * @param string $template_compiled
*/ */
function _compile_file($tpl_file, $template_source, &$template_compiled) function _compile_file($tpl_file, $template_source, &$template_compiled)
{ {
@@ -362,8 +363,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile a template tag * Compile a template tag
* *
* @access public * @param string $template_tag
* @param $template_tag
*/ */
function _compile_tag($template_tag) function _compile_tag($template_tag)
{ {
@@ -499,10 +499,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile the custom compiler tag * compile the custom compiler tag
* *
* @access public * sets $output to the compiled custom compiler tag
* @param $tag_command * @param string $tag_command
* @param $tag_args * @param string $tag_args
* @param $output * @param string $output
*/ */
function _compile_compiler_tag($tag_command, $tag_args, &$output) function _compile_compiler_tag($tag_command, $tag_args, &$output)
{ {
@@ -561,11 +561,11 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile block function tag * compile block function tag
* *
* @access public * sets $output to compiled block function tag
* @param $tag_command * @param string $tag_command
* @param $tag_args * @param string $tag_args
* @param $tag_modifier * @param string $tag_modifier
* @param $output * @param string $output
*/ */
function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output) function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
{ {
@@ -649,10 +649,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile custom function tag * compile custom function tag
* *
* @access public * @param string $tag_command
* @param $tag_command * @param string $tag_args
* @param $tag_args * @param string $tag_modifier
* @param $tag_modifier
*/ */
function _compile_custom_tag($tag_command, $tag_args, $tag_modifier) function _compile_custom_tag($tag_command, $tag_args, $tag_modifier)
{ {
@@ -678,10 +677,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile a registered object tag * compile a registered object tag
* *
* @access public * @param string $tag_command
* @param $tag_command * @param array $attrs
* @param $attrs * @param string $tag_modifier
* @param $tag_modifier
*/ */
function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier) function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
{ {
@@ -736,8 +734,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {insert ...} tag * Compile {insert ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_insert_tag($tag_args) function _compile_insert_tag($tag_args)
{ {
@@ -769,8 +766,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {config_load ...} tag * Compile {config_load ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_config_load_tag($tag_args) function _compile_config_load_tag($tag_args)
{ {
@@ -805,8 +801,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {include ...} tag * Compile {include ...} tag
* *
* @access public * $param string $tag_args
* $param $tag_args
*/ */
function _compile_include_tag($tag_args) function _compile_include_tag($tag_args)
{ {
@@ -855,8 +850,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {include ...} tag * Compile {include ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_include_php_tag($tag_args) function _compile_include_php_tag($tag_args)
{ {
@@ -889,8 +883,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {section ...} tag * Compile {section ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_section_start($tag_args) function _compile_section_start($tag_args)
{ {
@@ -994,8 +987,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {foreach ...} tag. * Compile {foreach ...} tag.
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_foreach_start($tag_args) function _compile_foreach_start($tag_args)
{ {
@@ -1058,9 +1050,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {capture} .. {/capture} tags * Compile {capture} .. {/capture} tags
* *
* @access public * @param boolean $start true if this is the {capture} tag
* @param $start * @param string $tag_args
* @param $tag_args
*/ */
function _compile_capture_tag($start, $tag_args = '') function _compile_capture_tag($start, $tag_args = '')
{ {
@@ -1085,9 +1076,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {if ...} tag * Compile {if ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args * @param boolean $elseif if true, uses elseif instead of if
* @param $elseif
*/ */
function _compile_if_tag($tag_args, $elseif = false) function _compile_if_tag($tag_args, $elseif = false)
{ {
@@ -1245,9 +1235,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Parse is expression * Parse is expression
* *
* @access public * @param string $is_arg
* @param $is_arg * @param array $tokens
* @param $tokens
*/ */
function _parse_is_expr($is_arg, $tokens) function _parse_is_expr($is_arg, $tokens)
{ {
@@ -1307,9 +1296,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Parse attribute string * Parse attribute string
* *
* @access public * @param string $tag_args
* @param $tag_args * @param true $quote unused?
* @param $quote
*/ */
function _parse_attrs($tag_args, $quote = true) function _parse_attrs($tag_args, $quote = true)
{ {
@@ -1392,8 +1380,7 @@ class Smarty_Compiler extends Smarty {
* compile multiple variables and section properties tokens into * compile multiple variables and section properties tokens into
* PHP code * PHP code
* *
* @access public * @param array $tokens
* @param $tokens
*/ */
function _parse_vars_props(&$tokens) function _parse_vars_props(&$tokens)
{ {
@@ -1406,9 +1393,8 @@ class Smarty_Compiler extends Smarty {
* compile single variable and section properties token into * compile single variable and section properties token into
* PHP code * PHP code
* *
* @access public * @param string $val
* @param $val * @param string $tag_attrs
* @param $tag_attrs
*/ */
function _parse_var_props($val, $tag_attrs = null) function _parse_var_props($val, $tag_attrs = null)
{ {
@@ -1454,8 +1440,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* expand quoted text with embedded variables * expand quoted text with embedded variables
* *
* @access public * @param string $var_expr
* @param $var_expr
*/ */
function _expand_quoted_text($var_expr) function _expand_quoted_text($var_expr)
{ {
@@ -1475,8 +1460,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse variable expression into PHP code * parse variable expression into PHP code
* *
* @access public * @param string $var_expr
* @param $var_expr
*/ */
function _parse_var($var_expr) function _parse_var($var_expr)
{ {
@@ -1572,8 +1556,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse arguments in function call parenthesis * parse arguments in function call parenthesis
* *
* @access public * @param string $parenth_args
* @param $parenth_args
*/ */
function _parse_parenth_args($parenth_args) function _parse_parenth_args($parenth_args)
{ {
@@ -1589,8 +1572,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse configuration variable expression into PHP code * parse configuration variable expression into PHP code
* *
* @access public * @param string $conf_var_expr
* @param $conf_var_expr
*/ */
function _parse_conf_var($conf_var_expr) function _parse_conf_var($conf_var_expr)
{ {
@@ -1611,8 +1593,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse section property expression into PHP code * parse section property expression into PHP code
* *
* @access public * @param string $section_prop_expr
* @param $section_prop_expr
*/ */
function _parse_section_prop($section_prop_expr) function _parse_section_prop($section_prop_expr)
{ {
@@ -1635,9 +1616,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse modifier chain into PHP code * parse modifier chain into PHP code
* *
* @access public * sets $output to parsed modified chain
* @param $output * @param string $output
* @param $modifier_string * @param string $modifier_string
*/ */
function _parse_modifiers(&$output, $modifier_string) function _parse_modifiers(&$output, $modifier_string)
{ {
@@ -1679,10 +1660,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* add plugin * add plugin
* *
* @access public * @param string $type
* @param $type * @param string $name
* @param $name * @param boolean? $delayed_loading
* @param $delayed_loading
*/ */
function _add_plugin($type, $name, $delayed_loading = null) function _add_plugin($type, $name, $delayed_loading = null)
{ {
@@ -1700,8 +1680,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compiles references of type $smarty.foo * Compiles references of type $smarty.foo
* *
* @access public * @param string $indexes
* @param $indexes
*/ */
function _compile_smarty_ref(&$indexes) function _compile_smarty_ref(&$indexes)
{ {
@@ -1814,8 +1793,6 @@ class Smarty_Compiler extends Smarty {
/** /**
* load pre- and post-filters * load pre- and post-filters
*
* @access public
*/ */
function _load_filters() function _load_filters()
{ {
@@ -1841,11 +1818,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* display Smarty syntax error * display Smarty syntax error
* *
* @access public * @param string $error_msg
* @param $error_msg * @param integer $error_type
* @param $error_type * @param string $file
* @param $file * @param integer $line
* @param $line
*/ */
function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null) function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null)
{ {
@@ -1863,8 +1839,8 @@ class Smarty_Compiler extends Smarty {
* compare to values by their string length * compare to values by their string length
* *
* @access private * @access private
* @param $a * @param string $a
* @param $b * @param string $b
*/ */
function _smarty_sort_length($a, $b) function _smarty_sort_length($a, $b)
{ {

View File

@@ -928,8 +928,8 @@ class Smarty
* test to see if valid cache exists for this template * test to see if valid cache exists for this template
* *
* @param string $tpl_file name of template file * @param string $tpl_file name of template file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
*/ */
function is_cached($tpl_file, $cache_id = null, $compile_id = null) function is_cached($tpl_file, $cache_id = null, $compile_id = null)
{ {
@@ -957,9 +957,9 @@ class Smarty
* or all compiled template files if one is not specified. * or all compiled template files if one is not specified.
* This function is for advanced use only, not normally needed. * This function is for advanced use only, not normally needed.
* *
* @param $tpl_file * @param string $tpl_file
* @param $compile_id * @param string $compile_id
* @param $exp_time * @param string $exp_time
*/ */
function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null) function clear_compiled_tpl($tpl_file = null, $compile_id = null, $exp_time = null)
{ {
@@ -971,7 +971,7 @@ class Smarty
/** /**
* Checks whether requested template exists. * Checks whether requested template exists.
* *
* @param $tpl_file * @param string $tpl_file
*/ */
function template_exists($tpl_file) function template_exists($tpl_file)
{ {
@@ -981,6 +981,7 @@ class Smarty
/** /**
* Returns an array containing template variables * Returns an array containing template variables
* *
* @return array
*/ */
function &get_template_vars() function &get_template_vars()
{ {
@@ -991,8 +992,8 @@ class Smarty
/** /**
* trigger Smarty error * trigger Smarty error
* *
* @param $error_msg * @param string $error_msg
* @param $error_type * @param integer $error_type
*/ */
function trigger_error($error_msg, $error_type = E_USER_WARNING) function trigger_error($error_msg, $error_type = E_USER_WARNING)
{ {
@@ -1003,9 +1004,9 @@ class Smarty
/** /**
* executes & displays the template results * executes & displays the template results
* *
* @param $tpl_file * @param string $tpl_file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
*/ */
function display($tpl_file, $cache_id = null, $compile_id = null) function display($tpl_file, $cache_id = null, $compile_id = null)
{ {
@@ -1015,10 +1016,10 @@ class Smarty
/** /**
* executes & returns or displays the template results * executes & returns or displays the template results
* *
* @param $_smarty_tpl_file * @param string $_smarty_tpl_file
* @param $_smarty_cache_id * @param string $_smarty_cache_id
* @param $_smarty_compile_id * @param string $_smarty_compile_id
* @param $_smarty_display * @param boolean $_smarty_display
*/ */
function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false) function fetch($_smarty_tpl_file, $_smarty_cache_id = null, $_smarty_compile_id = null, $_smarty_display = false)
{ {
@@ -1152,8 +1153,6 @@ class Smarty
/** /**
* assign $smarty interface variable * assign $smarty interface variable
*
* @access public
*/ */
function _assign_smarty_interface() function _assign_smarty_interface()
{ {
@@ -1181,8 +1180,8 @@ class Smarty
/** /**
* generate debug output * generate debug output
* * @return string debug.tpl template output
* @access public * @uses $debug_tpl debug template, used to display debugging output
*/ */
function _generate_debug_output() function _generate_debug_output()
{ {
@@ -1228,10 +1227,9 @@ class Smarty
/** /**
* load configuration values * load configuration values
* *
* @access public * @param string $file
* @param $file * @param string $section
* @param $section * @param string $scope
* @param $scope
*/ */
function config_load($file, $section = null, $scope = 'global') function config_load($file, $section = null, $scope = 'global')
{ {
@@ -1326,8 +1324,8 @@ class Smarty
/** /**
* determines if a resource is trusted or not * determines if a resource is trusted or not
* *
* @param $resource_type * @param string $resource_type
* @param $resource_name * @param string $resource_name
*/ */
function _is_trusted($resource_type, $resource_name) function _is_trusted($resource_type, $resource_name)
{ {
@@ -1361,8 +1359,8 @@ class Smarty
/** /**
* determines if a resource is secure or not. * determines if a resource is secure or not.
* *
* @param $resource_type * @param string $resource_type
* @param $resource_name * @param string $resource_name
*/ */
function _is_secure($resource_type, $resource_name) function _is_secure($resource_type, $resource_name)
{ {
@@ -1395,8 +1393,9 @@ class Smarty
/** /**
* Retrieves PHP script resource * Retrieves PHP script resource
* *
* @param $resource * sets $php_resource to the returned resource
* @param $resource_type * @param string $resource
* @param string $resource_type
* @param $php_resource * @param $php_resource
*/ */
function _get_php_resource($resource, &$resource_type, &$php_resource) function _get_php_resource($resource, &$resource_type, &$php_resource)
@@ -1457,8 +1456,8 @@ class Smarty
/** /**
* umm... process the template * umm... process the template
* *
* @param $tpl_file * @param string $tpl_file
* @param $compile_path * @param string $compile_path
*/ */
function _process_template($tpl_file, $compile_path) function _process_template($tpl_file, $compile_path)
{ {
@@ -1498,8 +1497,7 @@ class Smarty
/** /**
* Get the compile path for this template file * Get the compile path for this template file
* *
* @access private * @param string $tpl_file
* @param $tpl_file
*/ */
function _get_compile_path($tpl_file) function _get_compile_path($tpl_file)
{ {
@@ -1510,9 +1508,10 @@ class Smarty
/** /**
* write the compiled template * write the compiled template
* *
* @param $compile_path * @param string $compile_path
* @param $template_compiled * @param string $template_compiled
* @param $template_timestamp * @param integer $template_timestamp
* @return true
*/ */
function _write_compiled_template($compile_path, $template_compiled, $template_timestamp) function _write_compiled_template($compile_path, $template_compiled, $template_timestamp)
{ {
@@ -1525,10 +1524,10 @@ class Smarty
/** /**
* parse out the type and name from the template resource * parse out the type and name from the template resource
* *
* @param $file_base_path * @param string $file_base_path
* @param $file_path * @param string $file_path
* @param $resource_type * @param string $resource_type
* @param $resource_name * @param string $resource_name
*/ */
function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name) function _parse_file_path($file_base_path, $file_path, &$resource_type, &$resource_name)
{ {
@@ -1576,11 +1575,13 @@ class Smarty
* fetch the template info. Gets timestamp, and source * fetch the template info. Gets timestamp, and source
* if get_source is true * if get_source is true
* *
* @param $tpl_path * sets $template_source to the source of the template, and
* @param $template_source * $template_timestamp to its time stamp
* @param $template_timestamp * @param string $tpl_path
* @param $get_source * @param string $template_source
* @param $quiet * @param integer $template_timestamp
* @param boolean $get_source
* @param boolean $quiet
*/ */
function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false) function _fetch_template_info($tpl_path, &$template_source, &$template_timestamp, $get_source = true, $quiet = false)
{ {
@@ -1641,9 +1642,10 @@ class Smarty
/** /**
* called to compile the templates * called to compile the templates
* *
* @param $tpl_file * sets $template_compiled to the compiled template
* @param $template_source * @param string $tpl_file
* @param $template_compiled * @param string $template_source
* @param string $template_compiled
*/ */
function _compile_template($tpl_file, $template_source, &$template_compiled) function _compile_template($tpl_file, $template_source, &$template_compiled)
{ {
@@ -1686,8 +1688,8 @@ class Smarty
/** /**
* called for included templates * called for included templates
* *
* @param $_smarty_include_tpl_file * @param string $_smarty_include_tpl_file
* @param $_smarty_include_vars * @param string $_smarty_include_vars
*/ */
function _smarty_include($_smarty_include_tpl_file, $_smarty_include_vars) function _smarty_include($_smarty_include_tpl_file, $_smarty_include_vars)
{ {
@@ -1729,9 +1731,12 @@ class Smarty
/** /**
* called for included templates * called for included templates
* *
* @param $_smarty_include_php_file * @param string $_smarty_include_php_file
* @param $_smarty_assign * @param string $_smarty_assign variable to assign the included template's
* @param $_smarty_once * output into
* @param boolean $_smarty_once uses include_once if this is true
* @param array $_smarty_include_vars associative array of vars from
* {include file="blah" var=$var}
*/ */
function _smarty_include_php($_smarty_include_php_file, $_smarty_assign, $_smarty_once, $_smarty_include_vars) function _smarty_include_php($_smarty_include_php_file, $_smarty_assign, $_smarty_once, $_smarty_include_vars)
{ {
@@ -1770,7 +1775,7 @@ class Smarty
/** /**
* clear configuration values * clear configuration values
* *
* @param $var * @param string $var
*/ */
function clear_config($var = null) function clear_config($var = null)
{ {
@@ -1787,7 +1792,7 @@ class Smarty
/** /**
* Replace cached inserts with the actual results * Replace cached inserts with the actual results
* *
* @param $results * @param string $results
*/ */
function _process_cached_inserts($results) function _process_cached_inserts($results)
{ {
@@ -1837,7 +1842,7 @@ class Smarty
/** /**
* Handle insert tags * Handle insert tags
* *
* @param $args * @param array $args
*/ */
function _run_insert_handler($args) function _run_insert_handler($args)
{ {
@@ -1915,8 +1920,7 @@ function _run_insert_handler($args)
/** /**
* Remove starting and ending quotes from the string * Remove starting and ending quotes from the string
* *
* @access private * @param string $string
* @param $string
*/ */
function _dequote($string) function _dequote($string)
{ {
@@ -1932,9 +1936,9 @@ function _run_insert_handler($args)
* read in a file from line $start for $lines. * read in a file from line $start for $lines.
* read the entire file if $start and $lines are null. * read the entire file if $start and $lines are null.
* *
* @param $filename * @param string $filename
* @param $start * @param integer $start
* @param $lines * @param integer $lines
*/ */
function _read_file($filename, $start=null, $lines=null) function _read_file($filename, $start=null, $lines=null)
{ {
@@ -1974,9 +1978,9 @@ function _run_insert_handler($args)
/** /**
* write out a file to disk * write out a file to disk
* *
* @param $filename * @param string $filename
* @param $contents * @param string $contents
* @param $create_dirs * @param boolean $create_dirs
*/ */
function _write_file($filename, $contents, $create_dirs = false) function _write_file($filename, $contents, $create_dirs = false)
{ {
@@ -2003,9 +2007,9 @@ function _run_insert_handler($args)
/** /**
* get a concrete filename for automagically created content * get a concrete filename for automagically created content
* *
* @param $auto_base * @param string $auto_base
* @param $auto_source * @param string $auto_source
* @param $auto_id * @param string $auto_id
*/ */
function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null) function _get_auto_filename($auto_base, $auto_source = null, $auto_id = null)
{ {
@@ -2057,10 +2061,10 @@ function _run_insert_handler($args)
/** /**
* delete an automagically created file by name and id * delete an automagically created file by name and id
* *
* @param $auto_base * @param string $auto_base
* @param $auto_source * @param string $auto_source
* @param $auto_id * @param string $auto_id
* @param $exp_time * @param integer $exp_time
*/ */
function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null) function _rm_auto($auto_base, $auto_source = null, $auto_id = null, $exp_time = null)
{ {
@@ -2096,9 +2100,9 @@ function _run_insert_handler($args)
* delete a dir recursively (level=0 -> keep root) * delete a dir recursively (level=0 -> keep root)
* WARNING: no tests, it will try to remove what you tell it! * WARNING: no tests, it will try to remove what you tell it!
* *
* @param $dirname * @param string $dirname
* @param $level * @param integer $level
* @param $exp_time * @param integer $exp_time
*/ */
function _rmdir($dirname, $level = 1, $exp_time = null) function _rmdir($dirname, $level = 1, $exp_time = null)
{ {
@@ -2131,8 +2135,8 @@ function _run_insert_handler($args)
/** /**
* unlink a file, possibly using expiration time * unlink a file, possibly using expiration time
* *
* @param $resource * @param string $resource
* @param $exp_time * @param integer $exp_time
*/ */
function _unlink($resource, $exp_time = null) function _unlink($resource, $exp_time = null)
{ {
@@ -2148,7 +2152,7 @@ function _run_insert_handler($args)
/** /**
* create full directory structure * create full directory structure
* *
* @param $dir * @param string $dir
*/ */
function _create_dir_structure($dir) function _create_dir_structure($dir)
{ {
@@ -2194,10 +2198,10 @@ function _run_insert_handler($args)
* Prepend the cache information to the cache file * Prepend the cache information to the cache file
* and write it * and write it
* *
* @param $tpl_file * @param string $tpl_file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
* @param $results * @param string $results
*/ */
function _write_cache_file($tpl_file, $cache_id, $compile_id, $results) function _write_cache_file($tpl_file, $cache_id, $compile_id, $results)
{ {
@@ -2238,9 +2242,9 @@ function _run_insert_handler($args)
* regenerated or not * regenerated or not
* *
* @param string $tpl_file * @param string $tpl_file
* @param $cache_id * @param string $cache_id
* @param $compile_id * @param string $compile_id
* @param $results * @param string $results
*/ */
function _read_cache_file($tpl_file, $cache_id, $compile_id, &$results) function _read_cache_file($tpl_file, $cache_id, $compile_id, &$results)
{ {
@@ -2325,8 +2329,8 @@ function _run_insert_handler($args)
/** /**
* get filepath of requested plugin * get filepath of requested plugin
* *
* @param $type * @param string $type
* @param $name * @param string $name
*/ */
function _get_plugin_filepath($type, $name) function _get_plugin_filepath($type, $name)
{ {
@@ -2369,7 +2373,7 @@ function _run_insert_handler($args)
/** /**
* Load requested plugins * Load requested plugins
* *
* @param $plugins * @param array $plugins
*/ */
function _load_plugins($plugins) function _load_plugins($plugins)
{ {
@@ -2480,7 +2484,7 @@ function _run_insert_handler($args)
/** /**
* load a resource plugin * load a resource plugin
* *
* @param $type * @param string $type
*/ */
function _load_resource_plugin($type) function _load_resource_plugin($type)
{ {
@@ -2540,7 +2544,6 @@ function _run_insert_handler($args)
/** /**
* automatically load a set of filters * automatically load a set of filters
*
*/ */
function _autoload_filters() function _autoload_filters()
{ {
@@ -2554,7 +2557,7 @@ function _run_insert_handler($args)
/** /**
* Quote subpattern references * Quote subpattern references
* *
* @param $string * @param string $string
*/ */
function quote_replace($string) function quote_replace($string)
{ {
@@ -2565,9 +2568,12 @@ function _run_insert_handler($args)
/** /**
* trigger Smarty plugin error * trigger Smarty plugin error
* *
* @param $error_msg * @param string $error_msg
* @param $tpl_file * @param string $tpl_file
* @param $tpl_line * @param integer $tpl_line
* @param string $file
* @param integer $line
* @param integer $error_type
*/ */
function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null, function _trigger_fatal_error($error_msg, $tpl_file = null, $tpl_line = null,
$file = null, $line = null, $error_type = E_USER_ERROR) $file = null, $line = null, $error_type = E_USER_ERROR)
@@ -2587,7 +2593,7 @@ function _run_insert_handler($args)
/** /**
* Get seconds and microseconds * Get seconds and microseconds
* * @return double
*/ */
function _get_microtime() function _get_microtime()
{ {
@@ -2600,8 +2606,8 @@ function _run_insert_handler($args)
/** /**
* Get path to file from include_path * Get path to file from include_path
* *
* @param $file_path * @param string $file_path
* @param $new_file_path * @param string $new_file_path
*/ */
function _get_include_path($file_path, &$new_file_path) function _get_include_path($file_path, &$new_file_path)
{ {

View File

@@ -3,11 +3,6 @@
/** /**
* Project: Smarty: the PHP compiling template engine * Project: Smarty: the PHP compiling template engine
* File: Smarty_Compiler.class.php * File: Smarty_Compiler.class.php
* Author: Monte Ohrt <monte@ispi.net>
* Andrei Zmievski <andrei@php.net>
*
* Version: 2.4.2
* Copyright: 2001,2002 ispi of Lincoln, Inc.
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@@ -35,12 +30,20 @@
* *
* The latest version of Smarty can be obtained from: * The latest version of Smarty can be obtained from:
* http://www.phpinsider.com/ * http://www.phpinsider.com/
* * @link http://www.phpinsider.com/
* @author Monte Ohrt <monte@ispi.net>
* @author Andrei Zmievski <andrei@php.net>
* @version 2.4.2
* @copyright 2001,2002 ispi of Lincoln, Inc.
* @package Smarty
*/ */
class Smarty_Compiler extends Smarty { class Smarty_Compiler extends Smarty {
// internal vars // internal vars
/**#@+
* @access private
*/
var $_sectionelse_stack = array(); // keeps track of whether section had 'else' part var $_sectionelse_stack = array(); // keeps track of whether section had 'else' part
var $_foreachelse_stack = array(); // keeps track of whether foreach had 'else' part var $_foreachelse_stack = array(); // keeps track of whether foreach had 'else' part
var $_literal_blocks = array(); // keeps literal template blocks var $_literal_blocks = array(); // keeps literal template blocks
@@ -69,11 +72,9 @@ class Smarty_Compiler extends Smarty {
var $_obj_start_regexp = null; var $_obj_start_regexp = null;
var $_obj_params_regexp = null; var $_obj_params_regexp = null;
var $_obj_call_regexp = null; var $_obj_call_regexp = null;
/**#@-*/
/** /**
* The class constructor. * The class constructor.
*
* @access public
*/ */
function Smarty_Compiler() function Smarty_Compiler()
{ {
@@ -198,10 +199,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile a template file * compile a template file
* *
* @access public * sets $template_compiled to the compiled source
* @param $tpl_file * @param string $tpl_file
* @param $template_source * @param string $template_source
* @param $template_compiled * @param string $template_compiled
*/ */
function _compile_file($tpl_file, $template_source, &$template_compiled) function _compile_file($tpl_file, $template_source, &$template_compiled)
{ {
@@ -362,8 +363,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile a template tag * Compile a template tag
* *
* @access public * @param string $template_tag
* @param $template_tag
*/ */
function _compile_tag($template_tag) function _compile_tag($template_tag)
{ {
@@ -499,10 +499,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile the custom compiler tag * compile the custom compiler tag
* *
* @access public * sets $output to the compiled custom compiler tag
* @param $tag_command * @param string $tag_command
* @param $tag_args * @param string $tag_args
* @param $output * @param string $output
*/ */
function _compile_compiler_tag($tag_command, $tag_args, &$output) function _compile_compiler_tag($tag_command, $tag_args, &$output)
{ {
@@ -561,11 +561,11 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile block function tag * compile block function tag
* *
* @access public * sets $output to compiled block function tag
* @param $tag_command * @param string $tag_command
* @param $tag_args * @param string $tag_args
* @param $tag_modifier * @param string $tag_modifier
* @param $output * @param string $output
*/ */
function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output) function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output)
{ {
@@ -649,10 +649,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile custom function tag * compile custom function tag
* *
* @access public * @param string $tag_command
* @param $tag_command * @param string $tag_args
* @param $tag_args * @param string $tag_modifier
* @param $tag_modifier
*/ */
function _compile_custom_tag($tag_command, $tag_args, $tag_modifier) function _compile_custom_tag($tag_command, $tag_args, $tag_modifier)
{ {
@@ -678,10 +677,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* compile a registered object tag * compile a registered object tag
* *
* @access public * @param string $tag_command
* @param $tag_command * @param array $attrs
* @param $attrs * @param string $tag_modifier
* @param $tag_modifier
*/ */
function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier) function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier)
{ {
@@ -736,8 +734,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {insert ...} tag * Compile {insert ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_insert_tag($tag_args) function _compile_insert_tag($tag_args)
{ {
@@ -769,8 +766,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {config_load ...} tag * Compile {config_load ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_config_load_tag($tag_args) function _compile_config_load_tag($tag_args)
{ {
@@ -805,8 +801,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {include ...} tag * Compile {include ...} tag
* *
* @access public * $param string $tag_args
* $param $tag_args
*/ */
function _compile_include_tag($tag_args) function _compile_include_tag($tag_args)
{ {
@@ -855,8 +850,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {include ...} tag * Compile {include ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_include_php_tag($tag_args) function _compile_include_php_tag($tag_args)
{ {
@@ -889,8 +883,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {section ...} tag * Compile {section ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_section_start($tag_args) function _compile_section_start($tag_args)
{ {
@@ -994,8 +987,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {foreach ...} tag. * Compile {foreach ...} tag.
* *
* @access public * @param string $tag_args
* @param $tag_args
*/ */
function _compile_foreach_start($tag_args) function _compile_foreach_start($tag_args)
{ {
@@ -1058,9 +1050,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {capture} .. {/capture} tags * Compile {capture} .. {/capture} tags
* *
* @access public * @param boolean $start true if this is the {capture} tag
* @param $start * @param string $tag_args
* @param $tag_args
*/ */
function _compile_capture_tag($start, $tag_args = '') function _compile_capture_tag($start, $tag_args = '')
{ {
@@ -1085,9 +1076,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compile {if ...} tag * Compile {if ...} tag
* *
* @access public * @param string $tag_args
* @param $tag_args * @param boolean $elseif if true, uses elseif instead of if
* @param $elseif
*/ */
function _compile_if_tag($tag_args, $elseif = false) function _compile_if_tag($tag_args, $elseif = false)
{ {
@@ -1245,9 +1235,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Parse is expression * Parse is expression
* *
* @access public * @param string $is_arg
* @param $is_arg * @param array $tokens
* @param $tokens
*/ */
function _parse_is_expr($is_arg, $tokens) function _parse_is_expr($is_arg, $tokens)
{ {
@@ -1307,9 +1296,8 @@ class Smarty_Compiler extends Smarty {
/** /**
* Parse attribute string * Parse attribute string
* *
* @access public * @param string $tag_args
* @param $tag_args * @param true $quote unused?
* @param $quote
*/ */
function _parse_attrs($tag_args, $quote = true) function _parse_attrs($tag_args, $quote = true)
{ {
@@ -1392,8 +1380,7 @@ class Smarty_Compiler extends Smarty {
* compile multiple variables and section properties tokens into * compile multiple variables and section properties tokens into
* PHP code * PHP code
* *
* @access public * @param array $tokens
* @param $tokens
*/ */
function _parse_vars_props(&$tokens) function _parse_vars_props(&$tokens)
{ {
@@ -1406,9 +1393,8 @@ class Smarty_Compiler extends Smarty {
* compile single variable and section properties token into * compile single variable and section properties token into
* PHP code * PHP code
* *
* @access public * @param string $val
* @param $val * @param string $tag_attrs
* @param $tag_attrs
*/ */
function _parse_var_props($val, $tag_attrs = null) function _parse_var_props($val, $tag_attrs = null)
{ {
@@ -1454,8 +1440,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* expand quoted text with embedded variables * expand quoted text with embedded variables
* *
* @access public * @param string $var_expr
* @param $var_expr
*/ */
function _expand_quoted_text($var_expr) function _expand_quoted_text($var_expr)
{ {
@@ -1475,8 +1460,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse variable expression into PHP code * parse variable expression into PHP code
* *
* @access public * @param string $var_expr
* @param $var_expr
*/ */
function _parse_var($var_expr) function _parse_var($var_expr)
{ {
@@ -1572,8 +1556,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse arguments in function call parenthesis * parse arguments in function call parenthesis
* *
* @access public * @param string $parenth_args
* @param $parenth_args
*/ */
function _parse_parenth_args($parenth_args) function _parse_parenth_args($parenth_args)
{ {
@@ -1589,8 +1572,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse configuration variable expression into PHP code * parse configuration variable expression into PHP code
* *
* @access public * @param string $conf_var_expr
* @param $conf_var_expr
*/ */
function _parse_conf_var($conf_var_expr) function _parse_conf_var($conf_var_expr)
{ {
@@ -1611,8 +1593,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse section property expression into PHP code * parse section property expression into PHP code
* *
* @access public * @param string $section_prop_expr
* @param $section_prop_expr
*/ */
function _parse_section_prop($section_prop_expr) function _parse_section_prop($section_prop_expr)
{ {
@@ -1635,9 +1616,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* parse modifier chain into PHP code * parse modifier chain into PHP code
* *
* @access public * sets $output to parsed modified chain
* @param $output * @param string $output
* @param $modifier_string * @param string $modifier_string
*/ */
function _parse_modifiers(&$output, $modifier_string) function _parse_modifiers(&$output, $modifier_string)
{ {
@@ -1679,10 +1660,9 @@ class Smarty_Compiler extends Smarty {
/** /**
* add plugin * add plugin
* *
* @access public * @param string $type
* @param $type * @param string $name
* @param $name * @param boolean? $delayed_loading
* @param $delayed_loading
*/ */
function _add_plugin($type, $name, $delayed_loading = null) function _add_plugin($type, $name, $delayed_loading = null)
{ {
@@ -1700,8 +1680,7 @@ class Smarty_Compiler extends Smarty {
/** /**
* Compiles references of type $smarty.foo * Compiles references of type $smarty.foo
* *
* @access public * @param string $indexes
* @param $indexes
*/ */
function _compile_smarty_ref(&$indexes) function _compile_smarty_ref(&$indexes)
{ {
@@ -1814,8 +1793,6 @@ class Smarty_Compiler extends Smarty {
/** /**
* load pre- and post-filters * load pre- and post-filters
*
* @access public
*/ */
function _load_filters() function _load_filters()
{ {
@@ -1841,11 +1818,10 @@ class Smarty_Compiler extends Smarty {
/** /**
* display Smarty syntax error * display Smarty syntax error
* *
* @access public * @param string $error_msg
* @param $error_msg * @param integer $error_type
* @param $error_type * @param string $file
* @param $file * @param integer $line
* @param $line
*/ */
function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null) function _syntax_error($error_msg, $error_type = E_USER_ERROR, $file=null, $line=null)
{ {
@@ -1863,8 +1839,8 @@ class Smarty_Compiler extends Smarty {
* compare to values by their string length * compare to values by their string length
* *
* @access private * @access private
* @param $a * @param string $a
* @param $b * @param string $b
*/ */
function _smarty_sort_length($a, $b) function _smarty_sort_length($a, $b)
{ {