data = $raw; $obj->name = $name; return $obj; } /** * Get a name. */ public function getName() : string { return $this->name; } /** * Get a type. */ public function getType() : string { return $this->data['type']; } /** * Get a length. */ public function getLength() : ?int { return $this->data['len'] ?? null; } /** * Whether is not-storable. Not-storable attributes are not stored in DB. */ public function isNotStorable() : bool { return $this->data['notStorable'] ?? false; } /** * Whether is auto-increment. */ public function isAutoincrement() : bool { return $this->data['autoincrement'] ?? false; } /** * Whether a parameter is set. */ public function hasParam(string $name) : bool { return array_key_exists($name, $this->data); } /* * Get a parameter value by a name. * * @return ?mixed */ public function getParam(string $name) { return $this->data[$name] ?? null; } }