. // // @ignore // =================================================================================================== /** * @package Kaltura * @subpackage Client */ class Kaltura_Client_Type_Rule extends Kaltura_Client_ObjectBase { public function getKalturaObjectType() { return 'KalturaRule'; } public function __construct(SimpleXMLElement $xml = null) { parent::__construct($xml); if(is_null($xml)) return; $this->message = (string)$xml->message; if(empty($xml->actions)) $this->actions = array(); else $this->actions = Kaltura_Client_Client::unmarshalItem($xml->actions); if(empty($xml->conditions)) $this->conditions = array(); else $this->conditions = Kaltura_Client_Client::unmarshalItem($xml->conditions); if(empty($xml->contexts)) $this->contexts = array(); else $this->contexts = Kaltura_Client_Client::unmarshalItem($xml->contexts); if(!empty($xml->stopProcessing)) $this->stopProcessing = true; } /** * Message to be thrown to the player in case the rule is fulfilled * * * @var string */ public $message = null; /** * Actions to be performed by the player in case the rule is fulfilled * * * @var array of KalturaAccessControlAction */ public $actions; /** * Conditions to validate the rule * * * @var array of KalturaCondition */ public $conditions; /** * Indicates what contexts should be tested by this rule * * * @var array of KalturaAccessControlContextTypeHolder */ public $contexts; /** * Indicates that this rule is enough and no need to continue checking the rest of the rules * * * @var bool */ public $stopProcessing = null; }