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:
-
$arrayArray
Returns:
Class instance
beforeSave
-
$modifiedFields
Parameters:
-
$modifiedFieldsArrayThe fields that were modified
Returns:
clearAllExtras
()
clearExtra
-
$extraName
Parameters:
-
$extraNameStringThe name of the extra to remove
exportArray()
-
$options=null
Convert participant object to array safe to show to a user
Parameters:
-
$options=nullArray
Returns:
filter
-
$userIds -
$publisherId -
$streamName -
$state
Filter to just the ids of users which are, or are not, participating in a stream
Parameters:
-
$userIdsArrayAn array of user ids to filter
-
$publisherIdStringThe id of the publisher of the stream
-
$streamNameStringThe name of the stream
-
$stateString | 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:
-
$extraNameStringThe name of the extra to get
-
$defaultMixedThe 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:
-
$publisherIdString -
$streamNameString -
[$options=array()]Array optionalOptions to pass to the Db_Query->options method
Returns:
An array of user ids
setExtra
-
$extraName -
$value
Parameters:
-
$extraNameStringThe name of the extra to set, or an array of $extraName => $extraValue pairs
-
$valueMixedThe 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