/** * Define Auth * * @param Container $di DESCRIPTION * * @return mixed * * @access protected * * @SuppressWarnings(PHPMD.ShortVariable) */ protected function defineAuth(Container $di) { $di->params['Aura\\Auth\\AuthFactory']['cookie'] = $di->lazyValue('cookie'); $di->set('aura/auth:factory', $di->lazyNew('Aura\\Auth\\AuthFactory')); if (!$di->has('aura/auth:adapter')) { $di->set('aura/auth:adapter', $di->lazyNew('Aura\\Auth\\Adapter\\NullAdapter')); } $di->set('aura/auth:auth', $di->lazyGetCall('aura/auth:factory', 'newInstance')); $di->set('aura/auth:login', $di->lazyGetCall('aura/auth:factory', 'newLoginService', $di->lazyGet('aura/auth:adapter'))); $di->set('aura/auth:logout', $di->lazyGetCall('aura/auth:factory', 'newLogoutService', $di->lazyGet('aura/auth:adapter'))); $di->set('aura/auth:resume', $di->lazyGetCall('aura/auth:factory', 'newResumeService', $di->lazyGet('aura/auth:adapter'))); }