artox-lab/fisher

Role System

Package info

github.com/artox-lab/fisher

Homepage

pkg:composer/artox-lab/fisher

Statistics

Installs: 5 184

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.9 2016-02-19 13:05 UTC

Requires

  • php: >=5.5.0

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 39aa00e0d28998b97e252c183e407ae60b2b7172

  • Pavel Yankovets <p.yankovez.woop@artox.com>

accessauthrole

This package is auto-updated.

Last update: 2026-06-29 00:58:45 UTC


README

Installation via Composer

{
 "require": {
 "artox-lab/fisher": "1.0.0"
 }
}

Run composer update

Setup DB structure

You can install this DB structure using the following command:

php init.php

and enter data name database, username for database and password for username.

Usage

<?php

include 'vendor/autoload.php';

// Username for DB
$username = 'root';

// Password for DB
$password = '123';

// Initial class role system
 $roleSystem = \Fisher\RoleSystem::getInstance('mysql:host=localhost;charset=utf8;dbname=fisher_database', $username, $password);

// User id for db table `re_account_user`
$userId = 95;

// check rule for user
echo $roleSystem->checkAccess($userId, 'admin/catalog/products');