From c8c82a292a110ed0222e6f1998b4f5748197974c Mon Sep 17 00:00:00 2001 From: uwetews Date: Sun, 27 Dec 2015 08:12:46 +0100 Subject: [PATCH] - PHPdoc updates --- change_log.txt | 1 + libs/Smarty.class.php | 2 +- .../smarty_internal_compile_rdelim.php | 5 +++-- .../smarty_internal_compile_setfilter.php | 10 ++++----- .../smarty_internal_method_getglobal.php | 5 +++-- ...nternal_method_unregistercacheresource.php | 8 +++---- .../smarty_internal_runtime_cachemodify.php | 3 ++- ...smarty_internal_smartytemplatecompiler.php | 1 + libs/sysplugins/smarty_internal_template.php | 21 ++++++++----------- .../smarty_internal_templatecompilerbase.php | 4 ++-- .../smarty_internal_testinstall.php | 5 +++-- libs/sysplugins/smarty_internal_undefined.php | 5 +++-- .../smarty_template_resource_base.php | 5 +++-- 13 files changed, 40 insertions(+), 35 deletions(-) diff --git a/change_log.txt b/change_log.txt index 1e0c7745..a963f340 100644 --- a/change_log.txt +++ b/change_log.txt @@ -3,6 +3,7 @@ - improve inheritance code - update external methods - code fixes + - PHPdoc updates 25.12.2015 - compile {block} tag code and its processing into classes diff --git a/libs/Smarty.class.php b/libs/Smarty.class.php index f37fbd75..f1c5bdad 100644 --- a/libs/Smarty.class.php +++ b/libs/Smarty.class.php @@ -121,7 +121,7 @@ class Smarty extends Smarty_Internal_TemplateBase /** * smarty version */ - const SMARTY_VERSION = '3.1.30-dev/10'; + const SMARTY_VERSION = '3.1.30-dev/11'; /** * define variable scopes diff --git a/libs/sysplugins/smarty_internal_compile_rdelim.php b/libs/sysplugins/smarty_internal_compile_rdelim.php index 22b33eaa..b30c7362 100644 --- a/libs/sysplugins/smarty_internal_compile_rdelim.php +++ b/libs/sysplugins/smarty_internal_compile_rdelim.php @@ -20,10 +20,11 @@ class Smarty_Internal_Compile_Rdelim extends Smarty_Internal_CompileBase * Compiles code for the {rdelim} tag * This tag does output the right delimiter. * - * @param array $args array with attributes from parser - * @param object $compiler compiler object + * @param array $args array with attributes from parser + * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object * * @return string compiled code + * @throws \SmartyCompilerException */ public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler) { diff --git a/libs/sysplugins/smarty_internal_compile_setfilter.php b/libs/sysplugins/smarty_internal_compile_setfilter.php index b4932c1e..05086595 100644 --- a/libs/sysplugins/smarty_internal_compile_setfilter.php +++ b/libs/sysplugins/smarty_internal_compile_setfilter.php @@ -19,9 +19,9 @@ class Smarty_Internal_Compile_Setfilter extends Smarty_Internal_CompileBase /** * Compiles code for setfilter tag * - * @param array $args array with attributes from parser - * @param object $compiler compiler object - * @param array $parameter array with compilation parameter + * @param array $args array with attributes from parser + * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object + * @param array $parameter array with compilation parameter * * @return string compiled code */ @@ -48,8 +48,8 @@ class Smarty_Internal_Compile_Setfilterclose extends Smarty_Internal_CompileBase * Compiles code for the {/setfilter} tag * This tag does not generate compiled output. It resets variable filter. * - * @param array $args array with attributes from parser - * @param object $compiler compiler object + * @param array $args array with attributes from parser + * @param \Smarty_Internal_TemplateCompilerBase $compiler compiler object * * @return string compiled code */ diff --git a/libs/sysplugins/smarty_internal_method_getglobal.php b/libs/sysplugins/smarty_internal_method_getglobal.php index b2b19316..7a8a9bc7 100644 --- a/libs/sysplugins/smarty_internal_method_getglobal.php +++ b/libs/sysplugins/smarty_internal_method_getglobal.php @@ -22,8 +22,9 @@ class Smarty_Internal_Method_GetGlobal * Returns a single or all global variables * * @api Smarty::getGlobal() - - * @param string $varName variable name or null + * + * @param \Smarty_Internal_Data $data + * @param string $varName variable name or null * * @return string variable value or or array of variables */ diff --git a/libs/sysplugins/smarty_internal_method_unregistercacheresource.php b/libs/sysplugins/smarty_internal_method_unregistercacheresource.php index 80381015..c6999f7b 100644 --- a/libs/sysplugins/smarty_internal_method_unregistercacheresource.php +++ b/libs/sysplugins/smarty_internal_method_unregistercacheresource.php @@ -21,12 +21,12 @@ class Smarty_Internal_Method_UnregisterCacheResource /** * Registers a resource to fetch a template * - * @api Smarty::unregisterCacheResource() - * @link http://www.smarty.net/docs/en/api.unregister.cacheresource.tpl + * @api Smarty::unregisterCacheResource() + * @link http://www.smarty.net/docs/en/api.unregister.cacheresource.tpl * * @param \Smarty_Internal_TemplateBase|\Smarty_Internal_Template|\Smarty $obj - * @param string $type name of cache resource type - * + * @param $name + * * @return \Smarty|\Smarty_Internal_Template */ public function unregisterCacheResource(Smarty_Internal_TemplateBase $obj, $name) diff --git a/libs/sysplugins/smarty_internal_runtime_cachemodify.php b/libs/sysplugins/smarty_internal_runtime_cachemodify.php index 4e2fb83e..eb8d0cef 100644 --- a/libs/sysplugins/smarty_internal_runtime_cachemodify.php +++ b/libs/sysplugins/smarty_internal_runtime_cachemodify.php @@ -13,7 +13,8 @@ class Smarty_Internal_Runtime_CacheModify /** * check client side cache * - * @param Smarty_Internal_Template $_template + * @param \Smarty_Template_Cached $cached + * @param \Smarty_Internal_Template $_template * @param string $content */ public function cacheModifiedCheck(Smarty_Template_Cached $cached, Smarty_Internal_Template $_template, $content) diff --git a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php index 116bbea7..559051bd 100644 --- a/libs/sysplugins/smarty_internal_smartytemplatecompiler.php +++ b/libs/sysplugins/smarty_internal_smartytemplatecompiler.php @@ -144,6 +144,7 @@ class Smarty_Internal_SmartyTemplateCompiler extends Smarty_Internal_TemplateCom * @param array $parameter optional parameter array * @param string $key optional key for callback * @param bool $replace if true replace existing keyed callback + * */ public function registerPostCompileCallback($callback, $parameter = array(), $key = null, $replace = false) { diff --git a/libs/sysplugins/smarty_internal_template.php b/libs/sysplugins/smarty_internal_template.php index 4ab2c173..d135f74b 100644 --- a/libs/sysplugins/smarty_internal_template.php +++ b/libs/sysplugins/smarty_internal_template.php @@ -119,13 +119,11 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase /** * render template * - * @param bool $merge_tpl_vars if true parent template variables merged in to local scope * @param bool $no_output_filter if true do not run output filter - * @param bool $display true: display, false: fetch null: subtemplate + * @param null|bool $display true: display, false: fetch null: sub-template * - * @throws Exception - * @throws SmartyException - * @return string rendered template output + * @return string + * @throws \SmartyException */ public function render($no_output_filter = true, $display = null) { @@ -166,7 +164,7 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase // display or fetch if ($display) { if ($this->caching && $this->smarty->cache_modified_check) { - $this->smarty->ext->_cachemodify->cacheModifiedCheck($this->cached, $this, + $this->smarty->ext->_cacheModify->cacheModifiedCheck($this->cached, $this, isset($content) ? $content : ob_get_clean()); } else { if ((!$this->caching || $this->cached->has_nocache_code || $this->source->handler->recompiled) && @@ -264,9 +262,6 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase $tpl->cache_id = $cache_id; $tpl->compile_id = $compile_id; if (isset($uid)) { - if (isset($tpl->compiled)) { - $tpl->compiled->isInit = false; - } // for inline templates we can get all resource information from file dependency if (isset($tpl->compiled->file_dependency[ $uid ])) { list($filepath, $timestamp, $type) = $tpl->compiled->file_dependency[ $uid ]; @@ -403,10 +398,12 @@ class Smarty_Internal_Template extends Smarty_Internal_TemplateBase * - Decode saved properties from compiled template and cache files * - Check if compiled or cache file is valid * - * @param array $properties special template properties - * @param bool $cache flag if called from cache file + * @param \Smarty_Internal_Template $tpl + * @param array $properties special template properties + * @param bool $cache flag if called from cache file * - * @return bool flag if compiled or cache file is valid + * @return bool flag if compiled or cache file is valid + * @throws \SmartyException */ public function _decodeProperties(Smarty_Internal_Template $tpl, $properties, $cache = false) { diff --git a/libs/sysplugins/smarty_internal_templatecompilerbase.php b/libs/sysplugins/smarty_internal_templatecompilerbase.php index 69a23942..8fb6a271 100644 --- a/libs/sysplugins/smarty_internal_templatecompilerbase.php +++ b/libs/sysplugins/smarty_internal_templatecompilerbase.php @@ -17,8 +17,8 @@ * * @property Smarty_Internal_SmartyTemplateCompiler $prefixCompiledCode = '' * @property Smarty_Internal_SmartyTemplateCompiler $postfixCompiledCode = '' - * @method Smarty_Internal_SmartyTemplateCompiler registerPostCompileCallback($callback, $parameter = array(), $key = null, $replace = false) - * @method Smarty_Internal_SmartyTemplateCompiler unregisterPostCompileCallback($key) + * @method registerPostCompileCallback($callback, $parameter = array(), $key = null, $replace = false) + * @method unregisterPostCompileCallback($key) */ abstract class Smarty_Internal_TemplateCompilerBase { diff --git a/libs/sysplugins/smarty_internal_testinstall.php b/libs/sysplugins/smarty_internal_testinstall.php index fc038302..c75fe87b 100644 --- a/libs/sysplugins/smarty_internal_testinstall.php +++ b/libs/sysplugins/smarty_internal_testinstall.php @@ -20,9 +20,10 @@ class Smarty_Internal_TestInstall * diagnose Smarty setup * If $errors is secified, the diagnostic report will be appended to the array, rather than being output. * - * @param array $errors array to push results into rather than outputting them + * @param \Smarty $smarty + * @param array $errors array to push results into rather than outputting them * - * @return bool status, true if everything is fine, false else + * @return bool status, true if everything is fine, false else */ public static function testInstall(Smarty $smarty, &$errors = null) { diff --git a/libs/sysplugins/smarty_internal_undefined.php b/libs/sysplugins/smarty_internal_undefined.php index 93fca8ec..2a216c63 100644 --- a/libs/sysplugins/smarty_internal_undefined.php +++ b/libs/sysplugins/smarty_internal_undefined.php @@ -17,12 +17,13 @@ class Smarty_Internal_Undefined * - Decode saved properties from compiled template and cache files * - Check if compiled or cache file is valid * + * @param \Smarty_Internal_Template $tpl * @param array $properties special template properties * @param bool $cache flag if called from cache file * - * @return bool flag if compiled or cache file is valid + * @return bool flag if compiled or cache file is valid */ - public function decodeProperties($tpl, $properties, $cache = false) + public function decodeProperties(Smarty_Internal_Template $tpl, $properties, $cache = false) { if ($cache) { $tpl->cached->valid = false; diff --git a/libs/sysplugins/smarty_template_resource_base.php b/libs/sysplugins/smarty_template_resource_base.php index 0911feb8..11313038 100644 --- a/libs/sysplugins/smarty_template_resource_base.php +++ b/libs/sysplugins/smarty_template_resource_base.php @@ -93,10 +93,11 @@ abstract class Smarty_Template_Resource_Base */ abstract public function process(Smarty_Internal_Template $_template); - /** + /** * get rendered template content by calling compiled or cached template code * - * @param string $unifunc function with template code + * @param \Smarty_Internal_Template $_template + * @param string $unifunc function with template code * * @return string * @throws \Exception