Skip to content

Instantly share code, notes, and snippets.

@jburns131
Created August 13, 2013 02:11
Show Gist options
  • Save jburns131/6217218 to your computer and use it in GitHub Desktop.
Save jburns131/6217218 to your computer and use it in GitHub Desktop.
Proposed Interface for phprbac

Proposed Interface:

  • Offer Two Interfaces:

    • All in one

        use PhpRbac\Rbac;
        
        $rbac = new Rbac; // Equals original jb::$RBAC object structure
      
    • Individual Components

        use PhpRbac\RbacBase;
        use PhpRbac\RbacPermissions;
        use PhpRbac\RbacRoles;
        use PhpRbac\RbacUsers;
      
        $rbac = new RbacBase;
        $perms = new RbacPermissions;
        $roles = new RbacRoles
        $users = new RbacUsers;
      

      This method allows users to extend their own class base through inheritance

@abiusx
Copy link

abiusx commented Aug 13, 2013

This is alright, but its better to rename RbacBase to RbacCore, because it has the core functionality not the base abstract ones. Most needs will only use that one, and run RBAC Checks.

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