Example #1
0
 public function __construct(Model $model, $name, $type)
 {
     $this->model = $model;
     $this->name = $name;
     $this->type = $type;
     if (!$model->has_attribute($name)) {
         $model->add_attribute(new Attribute($model, $name, $type));
     }
 }