Download the PHP package gobline/acl without Composer

On this page you can find all versions of the php package gobline/acl. 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 acl

ACL (Access Control List) component

ACL's allow an application to control access to its protected areas, files, operations and objects from requests.

Why Another ACL Component?

The ACL component was primarily written to add support for defining rules on path resources. You will find the basic usage in the following sections but by then, if you are already a little familiar to ACL, you can already have a look at the quick excerpt below demonstrating the utility and advantage of the component.

In a web application, this is particularly useful to control access on the application's areas through the URL path.

Creating an ACL

Adding Roles to the ACL

or

Defining Access Controls

After adding the relevant roles, rules can be established that define how resources may be accessed by roles.

To define a rule applied to all resources, the special resource named "*" can be used:

To define a rule with all privileges, the special privilege named "*" can be used:

Querying the ACL

After adding the rules, we can query the ACL to check if a role has been given permission or not.

You will note that by default, until a developer specifies an allow rule, denies access to every privilege upon every resource by every role.

Resources

As you might have noticed in the examples above, the resources are registered when defining the rules, while the roles must have previously been added to the ACL.

The reason for this is because the resources can not only just be a name or identifier, but also a pattern or regex, or even a custom object implementing the method of the interface.

The most straightforward example demonstrating the use of matchers, would be implementing an ACL managing access rights to files.

Another example:

Roles Inheritance

Roles can inherit from other roles, and consequently inherit their rules.

The example above also demonstrates the use of (because one might wonder what is the purpose of having a method if anything is denied by default anyway). The moderators inherit the view privilege from the guest role and the create and edit privileges from the member role. However, we don't want to allow a moderator to be able to create new pages, but only moderate existing pages. To achieve this, we simply add a deny rule overriding the inherited rule that granted create persmission, as shown above.

Sharing Roles among Multiple ACL Instances

There are cases where you might need to have multiple ACL instances. For instance, you might need to define rules for path resources, and rules for different resources in your application. To avoid mixing different type of resources in your ACL, you can create multiple ACL instances and share a unique role registry.

Installation

You can install the ACL component using the dependency management tool Composer. Run the require command to resolve and download the dependencies:


All versions of acl with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
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 gobline/acl contains the following files

Loading the files please wait ....