DBRole::__getNewRoleObject PHP Method

__getNewRoleObject() public method

public __getNewRoleObject ( ) : Role
return Scalr\Model\Entity\Role
    public function __getNewRoleObject()
    {
        if (!$this->__newRoleObject) {
            if ($this->id) {
                $this->__newRoleObject = Role::findPk($this->id);
            }
            if (!$this->__newRoleObject) {
                throw new Exception('Role object is not found');
            }
        }
        return $this->__newRoleObject;
    }