You are here

function KalturaSessionService::start in Kaltura 6.2

File

kaltura_client/KalturaClient.php, line 4086

Class

KalturaSessionService

Code

function start($secret, $userId = "", $type = 0, $partnerId = -1, $expiry = 86400, $privileges = null) {
  $kparams = array();
  $this->client
    ->addParam($kparams, "secret", $secret);
  $this->client
    ->addParam($kparams, "userId", $userId);
  $this->client
    ->addParam($kparams, "type", $type);
  $this->client
    ->addParam($kparams, "partnerId", $partnerId);
  $this->client
    ->addParam($kparams, "expiry", $expiry);
  $this->client
    ->addParam($kparams, "privileges", $privileges);
  $this->client
    ->queueServiceActionCall("session", "start", $kparams);
  if ($this->client
    ->isMultiRequest()) {
    return null;
  }
  $resultObject = $this->client
    ->doQueue();
  $this->client
    ->throwExceptionIfError($resultObject);
  $this->client
    ->validateObjectType($resultObject, "string");
  return $resultObject;
}