Download the PHP package dbeurive/rbac without Composer

On this page you can find all versions of the php package dbeurive/rbac. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package rbac

Description

This package contains a basic implementation of a role-based access control (RBAC) mechanism.

Please note that role-based access control (RBAC) differs from an access control list (ACL).

In general terms:

Please note that, because Higher-level roles subsume permissions owned by sub-roles, role-based access control is unsuitable to manage individuals' ownerships over resources.

Installation

Form the command line:

composer require dbeurive/rbac

Or, from within your file composer.json:

"require": {
    "dbeurive/rbac": "*"
}

Synopsis

Please note that you can also specify the hierarchy through an array:

NOTE: the key access ALWAYS points to an array of arrays.

Below, the graphical representation of the tree.

Example

API overview

construct($inHierarchyOrTopRole)

Construct a new hierarchy of roles.

The argument $inHierarchyOrTopRole may be a string or an array.

addSubRole($inRole)

Add a role to the level below the current level. The current level becomes the newly added sub level.

up()

Go back one level up from the current role.

canAccessResource($inRole, $inOtherRole)

Test if a given role ($inRole) can access resources managed by another role ($inOtherRole).

If the role $inRole can access the resources managed by the other role ($inOtherRole), then the method returns the value true. Otherwise it returns the value false.

cmp($inRole, $inOtherRole)

Compare the positions of two roles within the hierarchy.

toDot()

Generate the GraphViz representation of the hierarchy of roles.

The method returns a string that represents the DOT representation of the tree.

Assuming that you store this string in the file tree.dot, then you can get the graphical representation of the tree with the following command:

dot -Tgif -Ograph tree.dot

All versions of rbac with dependencies

PHP Build Version
Package Version
Requires dbeurive/tree Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dbeurive/rbac contains the following files

Loading the files please wait ....