Skip to content

Instantly share code, notes, and snippets.

@jburns131
Last active December 20, 2015 23:59
Show Gist options
  • Save jburns131/6216881 to your computer and use it in GitHub Desktop.
Save jburns131/6216881 to your computer and use it in GitHub Desktop.
My understanding of the public interface of phprbac...
  • Base Methods

    • jf::$RBAC->Assign($Role, $Permission)

    • jf::$RBAC->Check($Permission, $UserID)

    • jf::$RBAC->Enforce($Permission)

    • jf::$RBAC->Reset($Ensure=false)

    • jf::$RBAC->TablePrefix()

  • Permission Related Methods

    • jf::$RBAC->Permissions->Remove($ID, $Recursive=false)

    • jf::$RBAC->Permissions->UnassignRoles($ID)

    • jf::$RBAC->Permissions->Roles($Permission, $OnlyIDs=true)

    • jf::$RBAC->Permissions->RootID() // Returns 1, which is the root user ID

    • jf::$RBAC->Permissions->Add($Title, $Description, $ParentID=null)

    • jf::$RBAC->Permissions->Count()

    • jf::$RBAC->Permissions->PathID($Path)

    • jf::$RBAC->Permissions->TitleID($Title)

    • jf::$RBAC->Permissions->GetTitle($ID)

    • jf::$RBAC->Permissions->GetDescription($ID)

    • jf::$RBAC->Permissions->AddPath($Path, array $Descriptions=null)

    • jf::$RBAC->Permissions->Edit($ID, $NewTitle=null, $NewDescription=null)

    • jf::$RBAC->Permissions->Children($ID)

    • jf::$RBAC->Permissions->Descendants($ID)

    • jf::$RBAC->Permissions->Depth($ID)

    • jf::$RBAC->Permissions->Path($ID)

    • jf::$RBAC->Permissions->ParentNode($ID)

    • jf::$RBAC->Permissions->Reset($Ensure=false)

    • jf::$RBAC->Permissions->Assign($Role, $Permission)

    • jf::$RBAC->Permissions->Unassign($Role, $Permission)

    • jf::$RBAC->Permissions->ResetAssignments($Ensure=false)

    • jf::$RBAC->Permissions-TablePrefix()

  • Role Related Methods

    • jf::$RBAC->Roles->Remove($ID, $Recursive=false)

    • jf::$RBAC->Roles->UnassignPermissions($ID)

    • jf::$RBAC->Roles->UnassignUsers($ID)

    • jf::$RBAC->Roles->HasPermission($Role, $Permission)

    • jf::$RBAC->Roles->Permissions($Role, $OnlyIDs=true)

    • jf::$RBAC->Roles->RootID() // Returns 1, which is the root user ID

    • jf::$RBAC->Roles->Add($Title, $Description, $ParentID=null)

    • jf::$RBAC->Roles->Count()

    • jf::$RBAC->Roles->PathID($Path)

    • jf::$RBAC->Roles->TitleID($Title)

    • jf::$RBAC->Roles->GetTitle($ID)

    • jf::$RBAC->Roles->GetDescription($ID)

    • jf::$RBAC->Roles->AddPath($Path, array $Descriptions=null)

    • jf::$RBAC->Roles->Edit($ID, $NewTitle=null, $NewDescription=null)

    • jf::$RBAC->Roles->Children($ID)

    • jf::$RBAC->Roles->Descendants($ID)

    • jf::$RBAC->Roles->Depth($ID)

    • jf::$RBAC->Roles->Path($ID)

    • jf::$RBAC->Roles->ParentNode($ID)

    • jf::$RBAC->Roles->Reset($Ensure=false)

    • jf::$RBAC->Roles->Assign($Role, $Permission)

    • jf::$RBAC->Roles->Unassign($Role, $Permission)

    • jf::$RBAC->Roles->ResetAssignments($Ensure=false)

    • jf::$RBAC->Roles-TablePrefix()

  • User Related Methods

    • jf::$RBAC->Users->HasRole($Role, $User=null)

    • jf::$RBAC->Users->Assign($Role, $UserID=null)

    • jf::$RBAC->Users->Unassign($Role, $UserID=null)

    • jf::$RBAC->Users->AllRoles($UserID)

    • jf::$RBAC->Users->RoleCount($UserID=null)

    • jf::$RBAC->Users->ResetAssignments($Ensure=false)

    • jf::$RBAC->Users->TablePrefix()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment