Skip to content

Commit

Permalink
NEW: config passed to constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
xfra35 committed Jul 19, 2016
1 parent 7b62d1c commit a3df7c2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions lib/access.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,15 @@ protected function parseRoute($str) {
return array(explode('|',$verbs),$path);
}

//! Constructor
function __construct() {
$f3=\Base::instance();
$config=(array)$f3->get('ACCESS');
/**
* Constructor
* @param array $config
*/
function __construct($config=NULL) {
if (!isset($config)) {
$f3=\Base::instance();
$config=(array)$f3->get('ACCESS');
}
if (isset($config['policy']))
$this->policy($config['policy']);
if (isset($config['rules']))
Expand Down

0 comments on commit a3df7c2

Please sign in to comment.