| 1: | <?php
|
| 2: | |
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: |
|
| 10: |
|
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: |
|
| 17: | class Smarty_Internal_Compile_Append extends Smarty_Internal_Compile_Assign
|
| 18: | {
|
| 19: | |
| 20: | |
| 21: | |
| 22: | |
| 23: | |
| 24: | |
| 25: | |
| 26: | |
| 27: | |
| 28: |
|
| 29: | public function compile($args, Smarty_Internal_TemplateCompilerBase $compiler, $parameter)
|
| 30: | {
|
| 31: |
|
| 32: | $this->required_attributes = array('var', 'value');
|
| 33: | $this->shorttag_order = array('var', 'value');
|
| 34: | $this->optional_attributes = array('scope', 'index');
|
| 35: | $this->mapCache = array();
|
| 36: |
|
| 37: | $_attr = $this->getAttributes($compiler, $args);
|
| 38: |
|
| 39: | if (isset($_attr[ 'index' ])) {
|
| 40: | $_params[ 'smarty_internal_index' ] = '[' . $_attr[ 'index' ] . ']';
|
| 41: | unset($_attr[ 'index' ]);
|
| 42: | } else {
|
| 43: | $_params[ 'smarty_internal_index' ] = '[]';
|
| 44: | }
|
| 45: | $_new_attr = array();
|
| 46: | foreach ($_attr as $key => $value) {
|
| 47: | $_new_attr[] = array($key => $value);
|
| 48: | }
|
| 49: |
|
| 50: | return parent::compile($_new_attr, $compiler, $_params);
|
| 51: | }
|
| 52: | }
|
| 53: | |