2017 © Pedro Peláez
 

library php-rbac

rbac

image

createloop/php-rbac

rbac

  • Wednesday, August 10, 2016
  • by syhlion
  • Repository
  • 1 Watchers
  • 2 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

php-rbac

Installation:

``` json { "require": { "createloop/php-rbac": "1.1.*@dev" } }, (*1)




Defautl Usage: --------------- 1. 把DB資料夾裡的sql 部屬在database (預設載體為Mysql,以PDO實現,要用不同儲存方式請看 *Custom Usage*) 2. 調整Storage/config.php 裡面的連線參數設定 或是 new MysqlStorage 帶入連線必要參數 Custom Usage: --------------- 1. 可選擇自行實現儲存載體,只要繼承RBAC\Interfaces\IStroage ,實作裡面的方法即可。 Usage: ------ 驗證: ``` php $rbac = new Rbac("user_id",new ProxyFactory(IStorage storage), IStorage storage); $rbac->auth("controller/action/resource","get"); //return true or false

建構新 resource:, (*2)

``` php $admin = new admin(new ProxyFactory(IStorage $storage), IStorage $storage); $resource = $admin->createResource($name, $resource);, (*3)


建構新 Role: ``` php $admin = new admin(new ProxyFactory(IStorage $storage), IStorage $storage); $role = $resource = $admin->createRole($name);

賦予Role Resource:, (*4)

php $role->addResource($resource);, (*5)

License

Composer is licensed under the MIT License - see the LICENSE file for details, (*6)

The Versions

10/08 2016

dev-master

9999999-dev

rbac

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar Scott

26/09 2014

1.1.x-dev

1.1.9999999.9999999-dev

rbac

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar Scott

24/09 2014

1.1.1

1.1.1.0

rbac

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar Scott

23/09 2014

1.1.0

1.1.0.0

rbac

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar Scott

22/09 2014

1.0.1

1.0.1.0

rbac

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar Scott

19/09 2014

1.0.0

1.0.0.0

rbac

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar Scott