mirror of
https://github.com/smarty-php/smarty.git
synced 2025-08-07 03:44:26 +02:00
- added __toString method to the Smarty_Variable class
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
18/06/2010
|
||||
- added __toString method to the Smarty_Variable class
|
||||
|
||||
|
||||
14/06/2010
|
||||
- make handling of Smarty comments followed by newline BC to Smarty2
|
||||
|
||||
|
||||
===== RC2 =====
|
||||
|
||||
|
||||
|
||||
13/06/2010
|
||||
- bugfix Smarty3 did not handle hexadecimals like 0x0F as numerical value
|
||||
- bugifx Smarty3 did not accept numerical constants like .1 or 2. (without a leading or trailing digit)
|
||||
|
@@ -1,18 +1,18 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Smarty Internal Plugin Data
|
||||
*
|
||||
* This file contains the basic classes and methodes for template and variable creation
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Templates
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
* Smarty Internal Plugin Data
|
||||
*
|
||||
* This file contains the basic classes and methodes for template and variable creation
|
||||
*
|
||||
* @package Smarty
|
||||
* @subpackage Templates
|
||||
* @author Uwe Tews
|
||||
*/
|
||||
|
||||
/**
|
||||
* Base class with template and variable methodes
|
||||
*/
|
||||
* Base class with template and variable methodes
|
||||
*/
|
||||
class Smarty_Internal_Data {
|
||||
// class used for templates
|
||||
public $template_class = 'Smarty_Internal_Template';
|
||||
@@ -77,8 +77,8 @@ class Smarty_Internal_Data {
|
||||
*/
|
||||
public function assign_by_ref($tpl_var, &$value, $nocache = false, $scope = SMARTY_LOCAL_SCOPE)
|
||||
{
|
||||
trigger_error("function call 'assign_by_ref' is unknown or deprecated, use 'assignByRef'",E_USER_NOTICE);
|
||||
$this->assignByRef($tpl_var,$value,$nocache,$scope);
|
||||
trigger_error("function call 'assign_by_ref' is unknown or deprecated, use 'assignByRef'", E_USER_NOTICE);
|
||||
$this->assignByRef($tpl_var, $value, $nocache, $scope);
|
||||
}
|
||||
/**
|
||||
* appends values to template variables
|
||||
@@ -179,8 +179,8 @@ class Smarty_Internal_Data {
|
||||
*/
|
||||
public function append_by_ref($tpl_var, &$value, $merge = false)
|
||||
{
|
||||
trigger_error("function call 'append_by_ref' is unknown or deprecated, use 'appendByRef'",E_USER_NOTICE);
|
||||
$this->appendByRef($tpl_var,$value,$merge);
|
||||
trigger_error("function call 'append_by_ref' is unknown or deprecated, use 'appendByRef'", E_USER_NOTICE);
|
||||
$this->appendByRef($tpl_var, $value, $merge);
|
||||
}
|
||||
/**
|
||||
* Returns a single or all template variables
|
||||
@@ -388,12 +388,12 @@ class Smarty_Internal_Data {
|
||||
}
|
||||
|
||||
/**
|
||||
* class for the Smarty data object
|
||||
*
|
||||
* The Smarty data object will hold Smarty variables in the current scope
|
||||
*
|
||||
* @param object $parent tpl_vars next higher level of Smarty variables
|
||||
*/
|
||||
* class for the Smarty data object
|
||||
*
|
||||
* The Smarty data object will hold Smarty variables in the current scope
|
||||
*
|
||||
* @param object $parent tpl_vars next higher level of Smarty variables
|
||||
*/
|
||||
class Smarty_Data extends Smarty_Internal_Data {
|
||||
// array of variable objects
|
||||
public $tpl_vars = array();
|
||||
@@ -423,10 +423,10 @@ class Smarty_Data extends Smarty_Internal_Data {
|
||||
}
|
||||
}
|
||||
/**
|
||||
* class for the Smarty variable object
|
||||
*
|
||||
* This class defines the Smarty variable object
|
||||
*/
|
||||
* class for the Smarty variable object
|
||||
*
|
||||
* This class defines the Smarty variable object
|
||||
*/
|
||||
class Smarty_Variable {
|
||||
// template variable
|
||||
public $value;
|
||||
@@ -445,13 +445,18 @@ class Smarty_Variable {
|
||||
$this->nocache = $nocache;
|
||||
$this->scope = $scope;
|
||||
}
|
||||
|
||||
public function __toString ()
|
||||
{
|
||||
return $this->value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* class for undefined variable object
|
||||
*
|
||||
* This class defines an object for undefined variable handling
|
||||
*/
|
||||
* class for undefined variable object
|
||||
*
|
||||
* This class defines an object for undefined variable handling
|
||||
*/
|
||||
class Undefined_Smarty_Variable {
|
||||
// return always false
|
||||
public function __get ($name)
|
||||
|
Reference in New Issue
Block a user