Example #1
0
File: Tag.php Project: tourze/html
 /**
  * 如果属性不存在,不抛出异常,照常插入
  *
  * @param string $name
  * @param mixed  $value
  */
 public function __set($name, $value)
 {
     try {
         parent::__set($name, $value);
     } catch (UnknownPropertyException $e) {
         $this->setAttribute($name, $value);
     }
 }
Example #2
0
File: Base.php Project: tourze/html
 /**
  * 合并属性值
  *
  * @return string
  */
 protected function combineAttributes()
 {
     $attributes = $this->_attributes;
     return Html::attributes($attributes);
 }