1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- class Smarty_Data extends Smarty_Internal_Data
- {
-
- static $count = 0;
-
- public $dataObjectName = '';
-
- public $smarty = null;
-
- public function __construct($_parent = null, $smarty = null, $name = null)
- {
- parent::__construct();
- self::$count ++;
- $this->dataObjectName = 'Data_object ' . (isset($name) ? "'{$name}'" : self::$count);
- $this->smarty = $smarty;
- if (is_object($_parent)) {
-
- $this->parent = $_parent;
- } elseif (is_array($_parent)) {
-
- foreach ($_parent as $_key => $_val) {
- $this->tpl_vars[ $_key ] = new Smarty_Variable($_val);
- }
- } elseif ($_parent != null) {
- throw new SmartyException("Wrong type for template variables");
- }
- }
- }
|