Client
in package
Table of Contents
- __construct() : mixed
- __get() : Repository
- Magic methid to retreive repositories.
- getAccessToken() : AccessToken
- getRestClient() : RestClient
- getUser() : User
- Returns the current user, if logIn() was previously called successfully.
- logIn() : AccessToken
- Login with user name and password to access the API with the context of a user.
- setAccessToken() : Client
- setRestClient() : Client
Methods
__construct()
public
__construct(string $edmUrl, string $clientId, string $clientSecret) : mixed
Parameters
- $edmUrl : string
- $clientId : string
- $clientSecret : string
Return values
mixed —__get()
Magic methid to retreive repositories.
public
__get(string $name) : Repository
Parameters
- $name : string
-
The name of the repository to fetch
Tags
Return values
Repository —The repository matching the requested name
getAccessToken()
public
getAccessToken() : AccessToken
Return values
AccessToken —getRestClient()
public
getRestClient() : RestClient
Return values
RestClient —getUser()
Returns the current user, if logIn() was previously called successfully.
public
getUser() : User
Tags
Return values
User —The user belonging the the provided credentials
logIn()
Login with user name and password to access the API with the context of a user.
public
logIn(string $userName, string $password) : AccessToken
Parameters
- $userName : string
- $password : string
-
The password
Tags
Return values
AccessToken —The access token for the given users (e.g. to be stored in the session)
setAccessToken()
public
setAccessToken(AccessToken $accessToken) : Client
Parameters
- $accessToken : AccessToken
Return values
Client —setRestClient()
public
setRestClient(RestClient $restClient) : Client
Parameters
- $restClient : RestClient