id = $id; $this->createdAt = $createdAt; $this->name = $name; $this->label = $label; $this->model = $model; } /** * @return string */ public function getId() { return $this->id; } /** * @return string */ public function getCreatedAt() { return $this->createdAt; } /** * @return string */ public function getName() { return $this->name; } /** * @return string */ public function getLabel() { return $this->label; } /** * @return string */ public function getModel() { return $this->model; } /** * @param $array * * @return Token */ public static function fromArray($array) { $id = $array['id'] ?: null; $createdAt = $array['createdAt'] ?: null; $name = $array['name'] ?: null; $label = $array['label'] ?: null; $model = $array['model'] ?: null; return new Token($id, $createdAt, $name, $label, $model); } }