EDM SDK

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
throws
InvalidArgumentException

if no property with the provided name exists.

Return values
Repository

The repository matching the requested name

getAccessToken()

public getAccessToken() : AccessToken
Return values
AccessToken

getUser()

Returns the current user, if logIn() was previously called successfully.

public getUser() : User
Tags
throws
InvalidArgumentException

if provided credentials are invalid or no user is logged in

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
throws
InvalidArgumentException

if provided credentials are invalid

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

Search results