PHPackages                             szonov/dot-acl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. szonov/dot-acl

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

szonov/dot-acl
==============

Simple ACL library for actions in dot notation

v1.0.0(7y ago)011MITPHPPHP &gt;=7.0

Since Mar 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/szonov/dot-acl)[ Packagist](https://packagist.org/packages/szonov/dot-acl)[ RSS](/packages/szonov-dot-acl/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

dot-acl
=======

[](#dot-acl)

Simple Acl library for actions in "dot" notation, i.e. action is presents as 'resource.access'

You can add acl rules using wildcard '\*" instead of resource or access,

Valid examples:

```
$acl->allow('superadmin', '*.*');
$acl->allow('user', 'user.*');
$acl->allow('operator', '*.read');
$acl->allow('visitor', 'post.view');
```

Also, you can use '!' mark before action name for reverse access, i.e.

```
$acl->allow('user', '!admin.*'); // is the same as $acl->deny('user', 'admin.*')
$acl->deny('admin', '!admin.*'); // is the same as $acl->allow('admin', 'admin.*')
```

It is useful when you store all acl rules in single array and process it by only `$acl->allow` or `$acl->deny` function.

Usage Example
-------------

[](#usage-example)

```
include "vendor/autoload.php";

use SZonov\DotAcl\Acl;

$acl = new Acl();

$acl->setDefaultAction(false);

$acl->addRole('guest');
$acl->addRole('user');

$acl->addRole('admin', 'user');

$acl->allow('guest', 'system.index');
$acl->allow('guest', 'public.*');
$acl->allow('user', 'auth.logout');
$acl->allow('admin', '*.*');

echo "-------------- ALL ROLES -------------- \n";
print_r($acl->getRoles());

echo "------ ALLOWED TO public.index -------- \n";
print_r($acl->getAllowedRoles('public.index'));

echo "\n------ guest::system.index -------- \n";
var_export($acl->isAllowed('guest','system.index'));

echo "\n------ user::system.index -------- \n";
var_export($acl->isAllowed('user','system.index'));
echo "\n";

// output:
// -------------- ALL ROLES --------------
// Array
// (
//    [0] => guest
//    [1] => user
//    [2] => admin
// )
// ------ ALLOWED TO public.index --------
// Array
// (
//    [0] => guest
//    [1] => admin
// )
//
// ------ guest::system.index --------
// true
// ------ user::system.index --------
// false
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2629d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6c3e0ef652d0f30ea608a6f212da07287b11ff550f34967e0b734f4e613c321?d=identicon)[szonov](/maintainers/szonov)

---

Top Contributors

[![szonov](https://avatars.githubusercontent.com/u/13364789?v=4)](https://github.com/szonov "szonov (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/szonov-dot-acl/health.svg)

```
[![Health](https://phpackages.com/badges/szonov-dot-acl/health.svg)](https://phpackages.com/packages/szonov-dot-acl)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
