public function register(Container $pimple)
 {
     $pimple['Auth'] = function ($pimple) {
         $auth = new Auth($pimple->config('accessKey'), $pimple->config('secretKey'));
         return $auth;
     };
 }
Exemplo n.º 2
0
 /**
  * Registers the service provider
  *
  * @param Container $app - Pimple container / Silex app
  */
 public function register(Container $app)
 {
     // register self
     $app[$this->name] = function () use($app) {
         // create user provider
         $userProviderClass = $app->config('userProvider', 'Polymorph\\User\\UserProvider');
         $this->userProvider = new $userProviderClass($app);
         // return service provider
         return $this;
     };
 }