Ejemplo n.º 1
0
 /**
  * Gets or sets an attribute
  *
  * When no $value is given, the current content of the attribute is returned.
  * An empty string is returned for unset attributes.
  *
  * When a $value is given, the content is set to that value and the Element
  * itself is returned for easy chaining
  *
  * @param string $name Name of the attribute to access
  * @param null|string $value New value to set
  * @return string|$this
  */
 public function attr($name, $value = null)
 {
     if (strtolower($name) == 'multiple') {
         throw new \InvalidArgumentException('Sorry, the dropdown element does not support the "multiple" attribute');
     }
     return parent::attr($name, $value);
 }