instance() static public method

static public instance ( $setInstance = null )
Example #1
0
 public function initialize($controller, $settings = array())
 {
     Authsome::instance($this);
     $this->settings = Set::merge($this->settings, $settings);
     // Use the model name as the key everywhere by default
     $keys = array('configure', 'session', 'cookie');
     foreach ($keys as $prefix) {
         $key = $prefix . 'Key';
         if (empty($this->settings[$key])) {
             $this->settings[$key] = $this->settings['model'];
         }
     }
 }