\EventsForce\ResourcesSessions

Class for handling the sessions resource on the Events Force API: http://docs.eventsforce.apiary.io/#reference/sessions

Summary

Methods
Properties
Constants
setEvent()
getEventId()
__construct()
genEndpoint()
argsMerge()
getAll()
get()
No public properties found
No constants found
No protected methods found
$event
$endpoint_prefix
$client
N/A
No private methods found
No private properties found
N/A

Properties

$event

$event : integer

Event id which we'll be looking in

Type

integer

$endpoint_prefix

$endpoint_prefix : string

Stores the endpoint prefix prior to all requests

Type

string

$client

$client : \EventsForce\Client

Stores an instance of the client for resources to Access

Type

\EventsForce\Client

Methods

setEvent()

setEvent(boolean  $event_id = false) : $this

Method to set the current event we're looking up in for attendees

Parameters

boolean $event_id

Throws

\EventsForce\Exceptions\InvalidArgumentException

Returns

$this

getEventId()

getEventId() : integer

Getter for event id

Throws

\EventsForce\Exceptions\Exception

Returns

integer

__construct()

__construct(\EventsForce\Client  $client) 

BaseResource constructor.

Parameters

\EventsForce\Client $client

genEndpoint()

genEndpoint(  $suffix = '') : string

Method to generate the endpoint Accepts either string or array e.g string 2/attendees.json or array [2, 'attendees.json'] both return events/2/attendees.json when the endpoint_prefix is events

Parameters

$suffix

Returns

string

argsMerge()

argsMerge(  $args = null,   $defaults = null) : array

method to merge array of arguments with defaults

Parameters

$args
  • passed in arguments
$defaults
  • default argument array to merge with

Returns

array

getAll()

getAll() : \Psr\Http\Message\StreamInterface

Method to get all sessions for an event Api Docs: http://docs.eventsforce.apiary.io/#reference/sessions/eventseventidsessionsjson/get

Throws

\EventsForce\Exceptions\InvalidArgumentException

Returns

\Psr\Http\Message\StreamInterface

get()

get(boolean|integer  $session_id = false) : \Psr\Http\Message\StreamInterface

Method to get a single session for an event Api Docs: http://docs.eventsforce.apiary.io/#reference/sessions/eventseventidsessionssessionidjson/get

Parameters

boolean|integer $session_id

Throws

\EventsForce\Exceptions\EmptyResponseException

Returns

\Psr\Http\Message\StreamInterface