Ejemplo n.º 1
0
 public static function fromDbArray(array $arr, KalturaDetachedResponseProfile $responseProfile = null)
 {
     $newArr = new KalturaUserEntryArray();
     foreach ($arr as $obj) {
         /* @var $obj UserEntry */
         $nObj = KalturaUserEntry::getInstanceByType($obj->getType());
         if (!$nObj) {
             throw new KalturaAPIException(KalturaErrors::USER_ENTRY_OBJECT_TYPE_ERROR, $obj->getType(), $obj->getId());
         }
         $nObj->fromObject($obj, $responseProfile);
         $newArr[] = $nObj;
     }
     return $newArr;
 }
Ejemplo n.º 2
0
 /**
  * @action get
  * @param string $id
  * @return KalturaUserEntry
  * @throws KalturaAPIException
  */
 public function getAction($id)
 {
     $dbUserEntry = UserEntryPeer::retrieveByPK($id);
     if (!$dbUserEntry) {
         throw new KalturaAPIException(KalturaErrors::USER_ENTRY_NOT_FOUND, $id);
     }
     $userEntry = KalturaUserEntry::getInstanceByType($dbUserEntry->getType());
     if (!$userEntry) {
         return null;
     }
     $userEntry->fromObject($dbUserEntry);
     return $userEntry;
 }