File modules/template_engine/element/attribute/SimpleAttribute.class.php
Last commit: Sat Feb 22 22:23:01 2020 +0100 Jan Dankert Refactoring: Enable Autoloading, Fix namespace structure.
1 <?php 2 3 4 namespace template_engine\element\attribute; 5 6 7 use template_engine\element\Value; 8 9 class SimpleAttribute 10 { 11 12 protected $name; 13 protected $value; 14 15 /** 16 * SimpleAttribute constructor. 17 * @param $name 18 * @param $value 19 */ 20 public function __construct($name, $value) 21 { 22 $this->name = $name; 23 $this->value = $value; 24 } 25 26 27 public function render() { 28 return $this->name.'="'.(new Value($this->value))->render(Value::CONTEXT_HTML).'"'; 29 } 30 }
Downloadmodules/template_engine/element/attribute/SimpleAttribute.class.php
History Sat, 22 Feb 2020 22:23:01 +0100 Jan Dankert Refactoring: Enable Autoloading, Fix namespace structure.