logger = $logger; $this->manager = $manager; $this->hookContainer = $hookContainer; $this->hookRunner = new HookRunner( $hookContainer ); $this->config = $config; $this->userNameUtils = $userNameUtils; $this->postInitSetup(); } /** * A provider can override this to do any necessary setup after init() * is called. * * @since 1.37 * @stable to override */ protected function postInitSetup() { } /** * @deprecated since 1.37. For extension-defined authentication providers * that were using this method to trigger other work, please override * AbstractAuthenticationProvider::postInitSetup instead. If your extension * was using this to explicitly change the logger of an existing * AuthenticationProvider object, please file a report on phabricator - * there is no non-deprecated way to do this anymore. */ public function setLogger( LoggerInterface $logger ) { wfDeprecated( __METHOD__, '1.37' ); $this->logger = $logger; } /** * @deprecated since 1.37. For extension-defined authentication providers * that were using this method to trigger other work, please override * AbstractAuthenticationProvider::postInitSetup instead. If your extension * was using this to explicitly change the AuthManager of an existing * AuthenticationProvider object, please file a report on phabricator - * there is no non-deprecated way to do this anymore. */ public function setManager( AuthManager $manager ) { wfDeprecated( __METHOD__, '1.37' ); $this->manager = $manager; } /** * @deprecated since 1.37. For extension-defined authentication providers * that were using this method to trigger other work, please override * AbstractAuthenticationProvider::postInitSetup instead. If your extension * was using this to explicitly change the Config of an existing * AuthenticationProvider object, please file a report on phabricator - * there is no non-deprecated way to do this anymore. * @param Config $config */ public function setConfig( Config $config ) { wfDeprecated( __METHOD__, '1.37' ); $this->config = $config; } /** * @deprecated since 1.37. For extension-defined authentication providers * that were using this method to trigger other work, please override * AbstractAuthenticationProvider::postInitSetup instead. If your extension * was using this to explicitly change the HookContainer of an existing * AuthenticationProvider object, please file a report on phabricator - * there is no non-deprecated way to do this anymore. */ public function setHookContainer( HookContainer $hookContainer ) { wfDeprecated( __METHOD__, '1.37' ); $this->hookContainer = $hookContainer; $this->hookRunner = new HookRunner( $hookContainer ); } /** * @inheritDoc * @note Override this if it makes sense to support more than one instance */ public function getUniqueId() { return static::class; } /** * @since 1.35 * @return HookContainer */ protected function getHookContainer(): HookContainer { return $this->hookContainer; } /** * @internal This is for use by core only. Hook interfaces may be removed * without notice. * @since 1.35 * @return HookRunner */ protected function getHookRunner(): HookRunner { return $this->hookRunner; } }