本文整理汇总了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));
}
}