Copied!

SessionServiceInterface

SessionServiceInterface.php : 25
Interface

Service for managing collaboration sessions.

Methods

publicaddParticipant()

SessionServiceInterface.php : 85

Adds a participant to the collaboration session.

public addParticipant(SessionInterface $session, AbstractParticipantCreateStruct $createStruct) : ParticipantInterface

Parameters

Name Type Default value Description
$session SessionInterface - -
$createStruct AbstractParticipantCreateStruct - -

Return values

ParticipantInterface

Tags
Throws
NotFoundException

if the collaboration session longer exists

Throws
InvalidArgumentException

if the participant update struct is invalid

Throws
UnauthorizedException

if the user does not have permission to update the collaboration session

publiccreateSession()

SessionServiceInterface.php : 56

Creates a new collaboration session.

public createSession(AbstractSessionCreateStruct $createStruct) : SessionInterface

Parameters

Name Type Default value Description
$createStruct AbstractSessionCreateStruct - -

Return values

SessionInterface

Tags
Throws
UnauthorizedException

if the user does not have permission to create the collaboration session

Throws
InvalidArgumentException

if the collaboration session create struct is invalid

publicdeleteSession()

SessionServiceInterface.php : 76

Deletes an existing collaboration session.

public deleteSession(SessionInterface $session) : void

Parameters

Name Type Default value Description
$session SessionInterface - -
Tags
Throws
NotFoundException

if the collaboration session does not exist

Throws
UnauthorizedException

if the user does not have permission to delete the collaboration

publicfindSessions()

SessionServiceInterface.php : 48

Returns sessions matching the given query.

public findSessions([SessionQuery|null $query = null ]) : SessionListInterface

Parameters

Name Type Default value Description
$query SessionQuery|null null

Query used to fetch collaboration sessions

Return values

SessionListInterface

publicgetSession()

SessionServiceInterface.php : 33

Returns collaboration session with given id.

public getSession(int $id) : SessionInterface

Parameters

Name Type Default value Description
$id int - -

Return values

SessionInterface

Tags
Throws
NotFoundException

if the collaboration session does not exist

Throws
UnauthorizedException

if the user does not have permission to view the collaboration session

publicgetSessionByToken()

SessionServiceInterface.php : 41

Returns collaboration session with given token.

public getSessionByToken(string $token) : SessionInterface

Parameters

Name Type Default value Description
$token string - -

Return values

SessionInterface

Tags
Throws
NotFoundException

if the collaboration session does not exist

Throws
UnauthorizedException

if the user does not have permission to view the collaboration session

publicisSessionOwner()

SessionServiceInterface.php : 117

Checks if user is a session owner. If user is not passed, the current user reference will be used for comparison.

public isSessionOwner(SessionInterface $session[, UserReference|null $user = null ]) : bool

Parameters

Name Type Default value Description
$session SessionInterface - -
$user UserReference|null null -

Return values

bool

publicisSessionParticipant()

SessionServiceInterface.php : 122
public isSessionParticipant(SessionInterface $session, UserReference $userReference) : bool

Parameters

Name Type Default value Description
$session SessionInterface - -
$userReference UserReference - -

Return values

bool

publicremoveParticipant()

SessionServiceInterface.php : 109

Removes a participant from the collaboration session.

public removeParticipant(SessionInterface $session, ParticipantInterface $participant) : void

Parameters

Name Type Default value Description
$session SessionInterface - -
$participant ParticipantInterface - -
Tags
Throws
NotFoundException

if the collaboration session or given participant longer exists

Throws
UnauthorizedException

if the user does not have permission to update the collaboration.

publicupdateParticipant()

SessionServiceInterface.php : 97

Updates a participant data.

public updateParticipant(SessionInterface $session, ParticipantInterface $participant, AbstractParticipantUpdateStruct $updateStruct) : ParticipantInterface

Parameters

Name Type Default value Description
$session SessionInterface - -
$participant ParticipantInterface - -
$updateStruct AbstractParticipantUpdateStruct - -

Return values

ParticipantInterface

Tags
Throws
NotFoundException

if the collaboration session or given participant longer exists

Throws
InvalidArgumentException

if the participant update struct is invalid

Throws
UnauthorizedException

if the user does not have permission to update the collaboration session

publicupdateSession()

SessionServiceInterface.php : 65

Updates any existing collaboration session with the given data.

public updateSession(SessionInterface $session, AbstractSessionUpdateStruct $updateStruct) : SessionInterface

Parameters

Name Type Default value Description
$session SessionInterface - -
$updateStruct AbstractSessionUpdateStruct - -

Return values

SessionInterface

Tags
Throws
NotFoundException

if the collaboration session does not exist

Throws
UnauthorizedException

if the user does not have permission to update the collaboration session

Throws
InvalidArgumentException

if the collaboration update struct is invalid