JRA, PHP cAPI interface
  • Namespace
  • Class
  • Tree

Namespaces

  • JRA
    • Abstracts
    • Commands
      • Invokers
      • Methods
        • Content
        • Token
        • User
      • Routes
    • ComposerHandler
    • Config
      • Helper
    • Exceptions
    • Facades
    • Factories
    • Interfaces
    • Objects
      • Response
        • Data
    • Responsibilities
      • Handlers
      • Responsible
        • Login
        • Logout

Classes

  • APIFacade
  • ConfigFacade

Class ConfigFacade

JRA\Facades\ConfigFacade implements JRA\Interfaces\ConfigInterface
Namespace: JRA\Facades
Located at Facades/ConfigFacade.php

Methods summary

public
# __construct( JRA\Config\ARSAnnatech $pARSAnnatech, JRA\Config\Authenticate $pAuthenticate, JRA\Config\Server $pServer, JRA\Config\Version $pVersion )

ConfigFacade constructor.

ConfigFacade constructor.

Parameters

$pARSAnnatech
The config for all ars requests.
$pAuthenticate
The config for authenticate against the cAPI.
$pServer
The config which provides the server configuration for requesting.
$pVersion
The config which contains the version information of the cAPI.

Implementation of

JRA\Interfaces\ConfigInterface::__construct()
public
# setToken( string $pToken )

Sets the token for authentication.

Sets the token for authentication.

Parameters

$pToken
The token which should be set.

Throws

JRA\Exceptions\TokenConfigException
Throws an exception if something went wrong.

Implementation of

JRA\Interfaces\ConfigInterface::setToken()
public
# setCredentials( string $pUsername, string $pPassword )

Sets the user credentials for authentication.

Sets the user credentials for authentication.

Parameters

$pUsername
The username which should be set.
$pPassword
The password which should be set.

Throws

JRA\Exceptions\UserCredentialsConfigException
Throws an exception if something went wrong.

Implementation of

JRA\Interfaces\ConfigInterface::setCredentials()
public integer
# getAuthenticationMethod( )

Returns the authentication method.

Returns the authentication method.

Returns

integer
The id of the authentication method.

Implementation of

JRA\Interfaces\ConfigInterface::getAuthenticationMethod()
public array|string
# getAuthenticationCredentials( )

Return the authentication credentials for the selected authentication method.

Return the authentication credentials for the selected authentication method.

Returns

array|string
Returns an array with the user credentials or returns an string with the token.

Throws

JRA\Exceptions\TokenConfigException
Throws this exception if something went wrong with token returning.
JRA\Exceptions\UserCredentialsConfigException
Throws this exception if something went wrong with user credentials returning.
JRA\Exceptions\AuthenticationConfigException
Throws this exception if something went wrong with the authentication config itself.

Implementation of

JRA\Interfaces\ConfigInterface::getAuthenticationCredentials()
public
# setSession( string $pSession )

Sets the session id of the current logged in session.

Sets the session id of the current logged in session.

Parameters

$pSession
The session which should be stored.

Implementation of

JRA\Interfaces\ConfigInterface::setSession()
public string
# getSession( )

Return the session id.

Return the session id.

Returns

string
The session id of the current logged in session.

Implementation of

JRA\Interfaces\ConfigInterface::getSession()
public
# setUrl( string $pUrl )

Sets the url which should be used for requesting the cAPI.

Sets the url which should be used for requesting the cAPI.

Parameters

$pUrl
The url which should be set.

Throws

JRA\Exceptions\ServerConfigException
Throws an exception if the url is invalid.

Implementation of

JRA\Interfaces\ConfigInterface::setUrl()
public string
# getRestAPIUrl( )

Returns the optimized requesting url.

Returns the optimized requesting url.

Returns

string
The optimized requesting url.

Throws

JRA\Exceptions\ServerConfigException
Throws an exception if something went wrong on returning.

Implementation of

JRA\Interfaces\ConfigInterface::getRestAPIUrl()
public boolean
# isAutoLoginOn( )

Checks if auto login is either on or off.

Checks if auto login is either on or off.

Returns

boolean
Returns true if auto login if on, false otherwise.

Implementation of

JRA\Interfaces\ConfigInterface::isAutoLoginOn()
JRA, PHP cAPI interface API documentation generated by ApiGen