예제 #1
0
 /**
  * @internal
  */
 function __construct($opentok, $sessionId, $properties = array())
 {
     // unpack arguments
     $defaults = array('mediaMode' => MediaMode::ROUTED, 'location' => null);
     $properties = array_merge($defaults, array_intersect_key($properties, $defaults));
     list($mediaMode, $location) = array_values($properties);
     Validators::validateOpenTok($opentok);
     Validators::validateSessionId($sessionId);
     Validators::validateLocation($location);
     Validators::validateMediaMode($mediaMode);
     $this->opentok = $opentok;
     $this->sessionId = $sessionId;
     $this->location = $location;
     $this->mediaMode = $mediaMode;
 }