public function getById($id) { if (isset($this->data[$id])) { return $this->data[$id]; } return null; }