Streams_RelatedTo Class
Class representing 'RelatedTo' 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 related_to 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
clearAllExtras
()
clearExtra
-
$extraName
Parameters:
-
$extraName
StringThe name of the extra to remove
fetchAll
-
$publisherId
-
$streamNames
-
$relationType
-
[$options=array()]
Fetch all the relations given multiple category streams, and sort them by ascending weight.
Parameters:
-
$publisherId
StringThe publisher of the category streams
-
$streamNames
ArrayArray of criteria to put for stream names, which can include strings, arrays, Db_Range or Db_Expression objects.
-
$relationType
String | ArrayThe type of the relation. Can also be an array of criteria corresponding to the $streamNames array.
-
[$options=array()]
Array optionalOptions to apss to the Streams::related function. Can also include the following:
-
[asUserId]
String optionalOverride the default user id to fetch streams as. Not used for now, since this function always fetches the relations only.
-
Returns:
An array of Streams_RelatedTo objects sorted by ascending weight.
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
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_RelatedTo
setUp
()
The setUp() method is called the first time an object of this class is constructed.