public static function fromDbArray($arr) { $newArr = new KalturaAnnotationArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaAnnotation(); $nObj->fromObject($obj); $newArr[] = $nObj; } return $newArr; }
public static function fromDbArray($arr, KalturaDetachedResponseProfile $responseProfile = null) { $newArr = new KalturaAnnotationArray(); if ($arr == null) { return $newArr; } foreach ($arr as $obj) { $nObj = new KalturaAnnotation(); $nObj->fromObject($obj, $responseProfile); $newArr[] = $nObj; } return $newArr; }
/** * Retrieve an Annotation object by id * * @action get * @param string $id * @return KalturaAnnotation * @throws KalturaErrors::INVALID_OBJECT_ID */ function getAction($id) { $dbAnnotation = AnnotationPeer::retrieveByPK($id); if (!$dbAnnotation) { throw new KalturaAPIException(KalturaErrors::INVALID_OBJECT_ID, $id); } if ($dbAnnotation->getType() != AnnotationType::ANNOTATION) { throw new KalturaAPIException(KalturaErrors::INVALID_OBJECT_ID, $id); } $annotation = new KalturaAnnotation(); $annotation->fromObject($dbAnnotation); return $annotation; }