Beispiel #1
0
 /**
  * @param string $key
  *
  * @return string
  */
 public function get_attribute($key)
 {
     switch ($key) {
         case 'type':
             return $this->type;
         case 'value':
             if (!empty($this->value)) {
                 return $this->value;
             }
             return $this->default_value;
         default:
             return $this->attributes->get_attribute($key);
     }
 }
Beispiel #2
0
 public function get_id()
 {
     return $this->attributes->get_attribute('id');
 }