X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FSmarty.php;h=7c941d8cba681478b38db85af7cbf4150a5c57e9;hb=2aa397bc9ba4608d4146278d55dedd4080c53aec;hp=eb39ff0ad6de93125e1dbe734565f1cbc6aa9b32;hpb=a335f6b228626e3e1b2f1549c8ddcbb9232b3c6b;p=civicrm-core.git diff --git a/CRM/Core/Smarty.php b/CRM/Core/Smarty.php index eb39ff0ad6..7c941d8cba 100644 --- a/CRM/Core/Smarty.php +++ b/CRM/Core/Smarty.php @@ -1,7 +1,7 @@ customTemplateDir) && $config->customTemplateDir) { @@ -177,7 +176,7 @@ class CRM_Core_Smarty extends Smarty { * Method providing static instance of SmartTemplate, as * in Singleton pattern. */ - static function &singleton() { + public static function &singleton() { if (!isset(self::$_singleton)) { self::$_singleton = new CRM_Core_Smarty( ); self::$_singleton->initialize( ); @@ -193,11 +192,11 @@ class CRM_Core_Smarty extends Smarty { * @param string $resource_name * @param string $cache_id * @param string $compile_id - * @param boolean $display + * @param bool $display * * @return bool|mixed|string */ - function fetch($resource_name, $cache_id = NULL, $compile_id = NULL, $display = FALSE) { + public function fetch($resource_name, $cache_id = NULL, $compile_id = NULL, $display = FALSE) { if (preg_match( '/^(\s+)?string:/', $resource_name)) { $old_security = $this->security; $this->security = TRUE; @@ -213,11 +212,12 @@ class CRM_Core_Smarty extends Smarty { * Fetch a template (while using certain variables) * * @param string $resource_name - * @param array $vars (string $name => mixed $value) variables to export to Smarty + * @param array $vars + * (string $name => mixed $value) variables to export to Smarty. * @throws Exception * @return bool|mixed|string */ - function fetchWith($resource_name, $vars) { + public function fetchWith($resource_name, $vars) { $this->pushScope($vars); try { $result = $this->fetch($resource_name); @@ -234,7 +234,7 @@ class CRM_Core_Smarty extends Smarty { * @param string $name * @param $value */ - function appendValue($name, $value) { + public function appendValue($name, $value) { $currentValue = $this->get_template_vars($name); if (!$currentValue) { $this->assign($name, $value); @@ -246,7 +246,7 @@ class CRM_Core_Smarty extends Smarty { } } - function clearTemplateVars() { + public function clearTemplateVars() { foreach (array_keys($this->_tpl_vars) as $key) { if ($key == 'config' || $key == 'session') { continue; @@ -255,7 +255,7 @@ class CRM_Core_Smarty extends Smarty { } } - static function registerStringResource() { + public static function registerStringResource() { require_once 'CRM/Core/Smarty/resources/String.php'; civicrm_smarty_register_string_resource(); } @@ -263,7 +263,7 @@ class CRM_Core_Smarty extends Smarty { /** * @param $path */ - function addTemplateDir($path) { + public function addTemplateDir($path) { if ( is_array( $this->template_dir ) ) { array_unshift( $this->template_dir, $path ); } else { @@ -284,7 +284,8 @@ class CRM_Core_Smarty extends Smarty { * $smarty->popScope(); * @endcode * - * @param array $vars (string $name => mixed $value) + * @param array $vars + * (string $name => mixed $value). * @return CRM_Core_Smarty * @see popScope */ @@ -313,7 +314,8 @@ class CRM_Core_Smarty extends Smarty { } /** - * @param array $vars (string $name => mixed $value) + * @param array $vars + * (string $name => mixed $value). * @return CRM_Core_Smarty */ public function assignAll($vars) { @@ -323,4 +325,3 @@ class CRM_Core_Smarty extends Smarty { return $this; } } -