PHP Class Gpf_Api_Session

Inheritance: extends Gpf_Object
ファイルを表示 Open project: fubralimited/php-oara Class Usage Examples

Public Methods

Method Description
__construct ( $url )
getAPIVersion ( $fileName = __FILE__ ) : String
getAppVersion ( ) : string Get version of installed application
getDebug ( )
getMessage ( )
getRoleType ( )
getSessionId ( )
getUrl ( )
getUrlWithSessionInfo ( $url )
login ( $username, $password, $roleType = self::MERCHANT, $languageCode = null ) : boolean
loginWithAuthToken ( $authtoken, $roleType = self::MERCHANT, $languageCode = null ) : boolean
setDebug ( $debug = true )
setSessionId ( $sessionId, $roleType = self::MERCHANT )

Protected Methods

Method Description
checkApiVersion ( Gpf_Rpc_Form $form ) Check API version (has to be protected because of Drupal integration)
getAuthenticateClassName ( )

Private Methods

Method Description
authenticateRequest ( $username, $password, $authtoken, $roleType = self::MERCHANT, $languageCode = null ) : boolean
setMessage ( $msg )

Method Details

__construct() public method

public __construct ( $url )

checkApiVersion() protected method

Check API version (has to be protected because of Drupal integration)
protected checkApiVersion ( Gpf_Rpc_Form $form )
$form Gpf_Rpc_Form

getAPIVersion() public static method

public static getAPIVersion ( $fileName = __FILE__ ) : String
return String

getAppVersion() public method

Get version of installed application
public getAppVersion ( ) : string
return string version of installed application

getAuthenticateClassName() protected method

protected getAuthenticateClassName ( )

getDebug() public method

public getDebug ( )

getMessage() public method

public getMessage ( )

getRoleType() public method

public getRoleType ( )

getSessionId() public method

public getSessionId ( )

getUrl() public method

public getUrl ( )

getUrlWithSessionInfo() public method

public getUrlWithSessionInfo ( $url )

login() public method

public login ( $username, $password, $roleType = self::MERCHANT, $languageCode = null ) : boolean
$username
$password
$roleType Gpf_Api_Session::MERCHANT or Gpf_Api_Session::AFFILIATE
$languageCode language code (e.g. en-US, de-DE, sk, cz, du, ...)
return boolean true if user was successfully logged

loginWithAuthToken() public method

public loginWithAuthToken ( $authtoken, $roleType = self::MERCHANT, $languageCode = null ) : boolean
$authtoken
$roleType Gpf_Api_Session::MERCHANT or Gpf_Api_Session::AFFILIATE
$languageCode language code (e.g. en-US, de-DE, sk, cz, du, ...)
return boolean true if user was successfully logged

setDebug() public method

public setDebug ( $debug = true )

setSessionId() public method

public setSessionId ( $sessionId, $roleType = self::MERCHANT )