public static function fromControlPanelCommandArray($arr)
 {
     $newArr = new KalturaControlPanelCommandArray();
     foreach ($arr as $obj) {
         $nObj = new KalturaControlPanelCommand();
         $nObj->fromObject($obj);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
 public static function fromDbArray(array $arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaControlPanelCommandArray();
     foreach ($arr as $obj) {
         $nObj = new KalturaControlPanelCommand();
         $nObj->fromObject($obj, $responseProfile);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
Exemplo n.º 3
0
 /**
  * batch getCommand action returns the command with its current status
  * 
  * @action getCommand
  * @param int $commandId The id of the command
  * @return KalturaControlPanelCommand
  */
 function getCommandAction($commandId)
 {
     // finds command in the DB
     $commandDb = ControlPanelCommandPeer::retrieveByPK($commandId);
     if (!$commandDb) {
         throw new KalturaAPIException(KalturaErrors::COMMAND_NOT_FOUND, $commandId);
     }
     // returns the command
     $command = new KalturaControlPanelCommand();
     $command->fromObject($commandDb, $this->getResponseProfile());
     return $command;
 }