コード例 #1
0
 /**
  * TinyAuthorize::__construct()
  *
  * @param ComponentCollection $Collection
  * @param array $config
  */
 public function __construct(ComponentCollection $Collection, $config = [])
 {
     $config += $this->_defaultConfig;
     parent::__construct($Collection, $config);
     if (Cache::config($config['cache']) === false) {
         throw new CakeException(sprintf('TinyAuth could not find `%s` cache - expects at least a `default` cache', $config['cache']));
     }
 }
コード例 #2
0
 public function __construct(ComponentCollection $Collection, $settings = array())
 {
     $settings = am($this->_defaults, $settings);
     parent::__construct($Collection, $settings);
     if (Cache::config($settings['cache']) === false) {
         throw new CakeException(__('TinyAuth could not find `%s` cache - expects at least a `default` cache', $settings['cache']));
     }
     $this->_matchArray = $this->_getRoles();
 }
コード例 #3
0
 /**
  * Sets up additional actionMap values that match the configured `Routing.prefixes`.
  *
  * @param ComponentCollection $collection The component collection from the controller.
  * @param string $settings An array of settings.  This class does not use any settings.
  */
 public function __construct(ComponentCollection $collection, $settings = array())
 {
     parent::__construct($collection, $settings);
     $this->_setPrefixMappings();
 }
コード例 #4
0
 public function __construct(\ComponentCollection $collection, $settings = array())
 {
     $this->settings['Apis'] = $collection->getController()->Apis;
     parent::__construct($collection, $settings);
 }