public function __construct($text, $url, $attributes = array()) { $this->text = $text; $this->url = $url; if (is_array($attributes)) { $this->attributes($attributes); } }