1<?php
2
3/**
4 * class for the Smarty variable object
5 * This class defines the Smarty variable object
6 *
7 * @package    Smarty
8 * @subpackage Template
9 */
10class Smarty_Variable
11{
12    /**
13     * template variable
14     *
15     * @var mixed
16     */
17    public $value = null;
18
19    /**
20     * if true any output of this variable will be not cached
21     *
22     * @var boolean
23     */
24    public $nocache = false;
25
26    /**
27     * create Smarty variable object
28     *
29     * @param mixed   $value   the value to assign
30     * @param boolean $nocache if true any output of this variable will be not cached
31     */
32    public function __construct($value = null, $nocache = false)
33    {
34        $this->value = $value;
35        $this->nocache = $nocache;
36    }
37
38    /**
39     * <<magic>> String conversion
40     *
41     * @return string
42     */
43    public function __toString()
44    {
45        return (string)$this->value;
46    }
47}
48