PHP code example of casbin / psr3-bridge
1. Go to this page and download the library: Download casbin/psr3-bridge library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
casbin / psr3-bridge example snippets
use Casbin\Bridge\Logger\LoggerBridge;
use Casbin\Log\Log;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
$log = new Logger('name');
$log->pushHandler(new StreamHandler('path/to/your.log', Logger::WARNING));
Log::setLogger(new LoggerBridge($log));