예제 #1
0
파일: Model.php 프로젝트: jaz303/spitfire
 public function add_attribute(Attribute $attribute)
 {
     if (isset($this->attributes[$attribute->name()])) {
         throw new Exception("duplicate attribute {$attribute->name()}");
     }
     $this->attributes[$attribute->name()] = $attribute;
 }