public function __construct($id, Model $model = null, $type = null) { parent::__construct($id, $model); if ($type == null) { $type = self::TYPE_STRING; } $this->type = $type; }