本文整理汇总了PHP中Administration::objAuthenticationMech方法的典型用法代码示例。如果您正苦于以下问题:PHP Administration::objAuthenticationMech方法的具体用法?PHP Administration::objAuthenticationMech怎么用?PHP Administration::objAuthenticationMech使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Administration
的用法示例。
在下文中一共展示了Administration::objAuthenticationMech方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: tieInWithAuthenticationMechanism
/**
* Will bind with the authentication mechanism;
*
* This method will take the authentication object as a parameter, as long as that object implements the IFaceAuthentication
* interface. Thus we allow for different authentication schemes, without too much headache. Also, it will check that the
* current administration zone exists in the database, because we need a proper mapping scheme;
*
* @param IFaceAuthentication $objAuthMech The authentication object, passed as a parameter;
* @return void Doesn't return a thing. It will probably error if something goes wrong;
*/
public function tieInWithAuthenticationMechanism(IFaceAuthentication $objAuthMech)
{
// Tie the authentication object with me;
self::$objAuthenticationMech = $objAuthMech;
// Get the administrative 'Log Out' <a href=";
self::$objLogOutLink = URL::rewriteURL(new A(array(ADMIN_INTERFACE_ACTION)), new A(array(ADMIN_LOG_OUT)));
self::$objSwitcherLink = URL::rewriteURL(new A(array(ADMIN_INTERFACE_ACTION)), new A(array(ADMIN_SWITCH_THEME)));
// Set the proper ZONE;
if (self::$objAuthenticationMech->checkZoneByName($this->getObjectCLASS())->toBoolean() == FALSE) {
self::$objAuthenticationMech->doMakeZone($this->getObjectCLASS());
}
if (self::$objAuthenticationMech->checkAdministratorIsMappedToZone($this->getObjectCLASS())->toBoolean() == FALSE) {
self::$objAuthenticationMech->doMapAdministratorToZone($this->getObjectCLASS());
}
}