Created
July 9, 2013 09:04
-
-
Save larseirik/5955850 to your computer and use it in GitHub Desktop.
LokusUrls
- Experimental versjonen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
/** | |
* Description of LokusUrls | |
* | |
* @author lars.eirik.ronning | |
*/ | |
class LokusUrls { | |
const OpenAMCookieName="iPlanetDirectoryPro"; | |
const LOKUS_BLOCK_NAME ="ServicesURL"; | |
const LOKUS_FILE_NAME ="lokus.ini"; | |
public static function getLogoutUrl(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"LogoutRequestURL"); | |
} | |
public static function getMagentoDomain(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"MagentoDomain"); | |
} | |
public static function getPersonalTypeCheckoutURL(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"PersonalTypeCheckoutURL"); | |
} | |
public static function getFeideTypeCheckoutURL(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"FeideTypeCheckoutURL"); | |
} | |
public static function getAuthenticationURL(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"AuthenticateRequestURL"); | |
} | |
public static function getLogoutFromOpenAMRequestURL(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"LogoutOpenAMRequestURL"); | |
} | |
public static function getOpenAMIsLoggedInUrl() { | |
return eZINI::instance( self::LOKUS_FILE_NAME )->variable( self::LOKUS_BLOCK_NAME, 'OpenAMIsLoggedInRequestURL'); | |
} | |
public static function getOpenAmCookieValue(){ | |
if ( LokusUrls::isDebugMode() ) | |
{ | |
return self::OpenAMCookieName.'=AQIC5wM2LY4SfcysGWE0jFJw-9dRShyiLlNK2tsLnafvyhM.*AAJTSQACMDIAAlNLABQtNzk0NTY4Njg2OTE4ODI0MjU2NQACUzEAAjAx*'; | |
} | |
$cookieVal = isset($_COOKIE[self::OpenAMCookieName]) ? $_COOKIE[self::OpenAMCookieName] : null; | |
return self::OpenAMCookieName.'='.$cookieVal; | |
} | |
public static function getOpenAMLoginUrl(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"OpenAMLoginURL"); | |
} | |
public static function getOpenAmPort(){ | |
return eZINI::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"OpenAMPort"); | |
} | |
public static function getMemCacheServer(){ | |
$servers = eZIni::instance(self::LOKUS_FILE_NAME)->variable(self::LOKUS_BLOCK_NAME,"MemcacheServerList"); | |
return $servers[0]; | |
} | |
public static function isDebugMode(){ | |
return eZIni::instance(self::LOKUS_FILE_NAME)->variable('DebugSettings','UseLocalServicesData') == 'enabled'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment