Download the PHP package qifen/casbin without Composer

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

webman casbin 权限控制插件

webman casbin 权限控制插件。它基于 PHP-Casbin, 一个强大的、高效的开源访问控制框架,支持基于ACL, RBAC, ABAC等访问控制模型。

安装

配置

数据库配置

(1)修改数据库 database 配置

(2)执行 php phinx migrate -e dev -t 20210000000000_create_casbin_rule 导入数据库

(3)配置 config/redis 配置

重启webman

或者

用法

快速开始

安装成功后,可以这样使用:

你可以检查一个用户是否拥有某个权限:

更多 API 参考 Casbin API

为什么要使用Redis

  1. 由于webman是基于workerman的常驻内存框架。运行模式为多进程,而多进程中数据是互相隔离的。
  2. 在webman中使用casbin,当Enforcer中的策略发生变化时,调用 Watcher,向消息队列(MQ)中推动消息,监听该消息队列的Enforcer收到后,自动刷新该实例中的策略
  3. 这里通过 workerman/redis 的发布订阅模式实现

注意:在 PHP-FPM 环境下,并不需要Watcher,因为每个请求都是一个独立的fpm进程,都会实例化一个全新的Enforcer

感谢

Casbin,你可以查看全部文档在其 官网 上。


All versions of casbin with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
casbin/casbin Version ~3.0
illuminate/database Version ^8.83
illuminate/pagination Version ^8.83
illuminate/events Version ^8.83
workerman/redis Version ^1.0
qifen/phinx Version ^1.2
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 qifen/casbin contains the following files

Loading the files please wait ....