2015-01-04 05:51:52 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* class for the Smarty variable object
|
|
|
|
* This class defines the Smarty variable object
|
|
|
|
*
|
|
|
|
* @package Smarty
|
|
|
|
* @subpackage Template
|
|
|
|
*/
|
2022-11-22 21:22:57 +01:00
|
|
|
#[\AllowDynamicProperties]
|
2015-01-04 05:51:52 +01:00
|
|
|
class Smarty_Variable
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* template variable
|
|
|
|
*
|
|
|
|
* @var mixed
|
|
|
|
*/
|
|
|
|
public $value = null;
|
2016-02-09 01:27:15 +01:00
|
|
|
|
2015-01-04 05:51:52 +01:00
|
|
|
/**
|
|
|
|
* if true any output of this variable will be not cached
|
|
|
|
*
|
|
|
|
* @var boolean
|
|
|
|
*/
|
|
|
|
public $nocache = false;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* create Smarty variable object
|
|
|
|
*
|
|
|
|
* @param mixed $value the value to assign
|
|
|
|
* @param boolean $nocache if true any output of this variable will be not cached
|
|
|
|
*/
|
2015-10-29 22:17:35 +01:00
|
|
|
public function __construct($value = null, $nocache = false)
|
2015-01-04 05:51:52 +01:00
|
|
|
{
|
|
|
|
$this->value = $value;
|
|
|
|
$this->nocache = $nocache;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* <<magic>> String conversion
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function __toString()
|
|
|
|
{
|
2018-08-31 16:45:09 +02:00
|
|
|
return (string)$this->value;
|
2015-01-04 05:51:52 +01:00
|
|
|
}
|
|
|
|
}
|