Streams_Participant Class
Class representing 'Participant' rows in the 'Streams' database You can create an object of this class either to access its non-static methods, or to actually represent a participant row in the Streams database.
Item Index
Methods
Methods
__set_state
-
$array
Implements the __set_state method, so it can work with with var_export and be re-imported successfully.
Parameters:
-
$array
Array
Returns:
Class instance
beforeSave
-
$modifiedFields
Parameters:
-
$modifiedFields
ArrayThe fields that were modified
Returns:
clearAllExtras
()
clearExtra
-
$extraName
Parameters:
-
$extraName
StringThe name of the extra to remove
exportArray()
-
$options=null
Convert participant object to array safe to show to a user
Parameters:
-
$options=null
Array
Returns:
filter
-
$userIds
-
$publisherId
-
$streamName
-
$state
Filter to just the ids of users which are, or are not, participating in a stream
Parameters:
-
$userIds
ArrayAn array of user ids to filter
-
$publisherId
StringThe id of the publisher of the stream
-
$streamName
StringThe name of the stream
-
$state
String | Array | Nullcan be "invited", "participating", "left", or an array, or null. If null, then it will return any
Returns:
getAllExtras
()
Array
Returns:
The array of all extras set in the stream
getExtra
-
$extraName
-
$default
Parameters:
-
$extraName
StringThe name of the extra to get
-
$default
MixedThe value to return if the extra is missing
Returns:
The value of the extra, or the default value, or null
getUsers
-
$publisherId
-
$streamName
-
[$options=array()]
Get an array of users participating in the stream
Parameters:
-
$publisherId
String -
$streamName
String -
[$options=array()]
Array optionalOptions to pass to the Db_Query->options method
Returns:
An array of user ids
setExtra
-
$extraName
-
$value
Parameters:
-
$extraName
StringThe name of the extra to set, or an array of $extraName => $extraValue pairs
-
$value
MixedThe value to set the extra to
Returns:
Streams_Participant
setUp
()
The setUp() method is called the first time an object of this class is constructed.
states
()
Array
static
Get the names of the possible states