当前位置: 首页>>代码示例>>PHP>>正文


PHP Authenticator::setMethodHandler方法代码示例

本文整理汇总了PHP中Authenticator::setMethodHandler方法的典型用法代码示例。如果您正苦于以下问题:PHP Authenticator::setMethodHandler方法的具体用法?PHP Authenticator::setMethodHandler怎么用?PHP Authenticator::setMethodHandler使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Authenticator的用法示例。


在下文中一共展示了Authenticator::setMethodHandler方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: initController

 private function initController()
 {
     $this->frontController = new FrontController();
     // Create the database interface objects and their proxies and register
     // them with the FrontController.
     $configuration = new Configuration($this->dbConnector);
     $entries = new Entries($this->dbConnector);
     $authenticator = new Authenticator($this->dbConnector);
     $captchaAuth = new CaptchaAuth($this->dbConnector);
     $authenticator->setMethodHandler(AuthMethods::CAPTCHA, new CaptchaAuthHandler($captchaAuth));
     $resolvers = array(new DirectClassResolver('configuration', $configuration, array('getAll' => array(), 'getByName' => array(Types::STRING))), new DirectClassResolver('entries', $entries, array('getEntryCount' => array(), 'getAllIds' => array(Types::STRING), 'getIdsForRange' => array(Types::STRING, Types::INT, Types::INT), 'getEntryById' => array(Types::INT), 'addEntry' => array(Types::STRING, Types::STRING, Types::STRING))), new ClassResolver('auth', new AuthServer($authenticator)), new ClassResolver('captchaAuth', new CaptchaAuthServer($captchaAuth)), new CaptchaImageResolver($captchaAuth));
     foreach ($resolvers as $resolver) {
         $this->frontController->addResolver(new AuthResolverProxy($resolver, $authenticator));
     }
 }
开发者ID:klickverbot,项目名称:theBlackboard,代码行数:15,代码来源:Core.php


注:本文中的Authenticator::setMethodHandler方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。