id; } /** * Set usr_id * * @param integer $usrId */ public function setUsrId($usrId) { $this->usr_id = $usrId; } /** * Get usr_id * * @return integer */ public function getUsrId() { return $this->usr_id; } /** * Set role * * @param string $role */ public function setRole($role) { if (!in_array($role, array(self::ROLE_ADMIN, self::ROLE_EDITOR, self::ROLE_USER))) throw new \Exception('Unknown role `' . $role . '`'); $this->role = $role; } /** * Get role * * @return string */ public function getRole() { return $this->role; } /** * Set created * * @param datetime $created */ public function setCreated($created) { $this->created = $created; } /** * Get created * * @return datetime */ public function getCreated() { return $this->created; } /** * Set updated * * @param datetime $updated */ public function setUpdated($updated) { $this->updated = $updated; } /** * Get updated * * @return datetime */ public function getUpdated() { return $this->updated; } /** * Set list * * @param Entities\UsrList $list */ public function setList(\Entities\UsrList $list) { $this->list = $list; } /** * Get list * * @return Entities\UsrList */ public function getList() { return $this->list; } public function setUser(\User_Adapter $user) { return $this->setUsrId($user->get_id()); } public function getUser() { return \User_Adapter::getInstance($this->getUsrId(), \appbox::get_instance(\bootstrap::getCore())); } }