Part.class.php (450B)
1 <?php 2 3 namespace template_engine\components; 4 5 class PartComponent extends Component 6 { 7 public $class = ''; 8 public $id; 9 10 public function begin() 11 { 12 echo '<div'; 13 14 $this->class = strtr($this->class,[','=>' ']); 15 16 if ( !empty($this->class)) 17 echo ' class="'.$this->htmlvalue($this->class).'"'; 18 19 if ( !empty($this->id)) 20 echo ' id="'.$this->htmlvalue($this->id).'"'; 21 22 echo '>'; 23 } 24 25 public function end() 26 { 27 echo '</div>'; 28 } 29 }