public function getRootObjects(IRelatedObject $object) { /* @var $object mediaInfo */ $asset = $object->getasset(); $roots = array(); if ($asset) { /* @var $asset asset */ $roots[] = $asset; $entry = $asset->getentry(); if ($entry) { $roots[] = $entry; } } return $roots; }
public function getRootObjects(IRelatedObject $object) { /* @var $object FileAsset */ $rootObjects = array(); $parentObject = null; switch ($object->getObjectType()) { case FileAssetObjectType::UI_CONF: $parentObject = uiConfPeer::retrieveByPK($object->getObjectId()); break; } if ($parentObject) { /* @var $parentObject IRelatedObjectPeer */ $peer = $parentObject->getPeer(); if ($peer instanceof IRelatedObjectPeer) { $parentRoots = $peer->getRootObjects($parentObject); if (count($parentRoots)) { $rootObjects = array_merge($rootObjects, $parentRoots); } } $rootObjects[] = $parentObject; } return $rootObjects; }
public static function stop(IRelatedObject $object, KalturaObject $apiObject) { if ($object !== self::$cachedObject) { KalturaLog::debug("Object [" . get_class(self::$cachedObject) . "][" . self::$cachedObject->getId() . "] still caching"); return; } if ($apiObject->relatedObjects) { KalturaLog::debug("Stop " . get_class($apiObject) . " [" . print_r($apiObject, true) . "]"); $key = self::getObjectSpecificCacheKey(self::$cachedObject, self::$responseProfileKey); $value = self::getObjectSpecificCacheValue($apiObject, self::$cachedObject, self::$responseProfileKey); self::set($key, $value); } else { KalturaLog::debug("API Object [" . get_class($apiObject) . "] has no related objects"); } self::$cachedObject = null; self::$cachePerUser = false; }
protected function hasCachedRootObjects(IRelatedObject $object) { $peer = $object->getPeer(); if (!$peer instanceof IRelatedObjectPeer) { return false; } if ($peer->isReferenced($object)) { return false; } if (isset($this->queryCache[kResponseProfileCacher::CACHE_ROOT_OBJECTS])) { return true; } $roots = $peer->getRootObjects($object); foreach ($roots as $index => $root) { if (!$this->isCachedObject($root)) { unset($roots[$index]); } } if (count($roots)) { $this->queryCache[kResponseProfileCacher::CACHE_ROOT_OBJECTS] = $roots; return true; } return false; }
public function getRootObjects(IRelatedObject $object) { return array(DropFolderPeer::retrieveByPK($object->getDropFolderId())); }
public function getRootObjects(IRelatedObject $object) { /* @var $object CuePoint */ $entry = entryPeer::retrieveByPK($object->getEntryId()); if ($entry) { return array($entry); } return array(); }
public function getRootObjects(IRelatedObject $object) { /* @var $object category */ $rootCategory = $object->getRootCategoryFromFullIds($object); if ($rootCategory) { return array($rootCategory); } return array(); }
public function getRootObjects(IRelatedObject $object) { return array(entryPeer::retrieveByPK($object->getEntryId())); }
public function getRootObjects(IRelatedObject $object) { /* @var $object categoryEntry */ $roots = array(); $category = categoryPeer::retrieveByPK($object->getCategoryId()); if ($category) { $roots = categoryPeer::getRootObjects($category); $roots[] = $category; } $entry = entryPeer::retrieveByPK($object->getEntryId()); if ($entry) { $roots[] = $entry; } return $roots; }
public function getRootObjects(IRelatedObject $object) { /* @var $object EntryDistribution */ $roots = array(); $distributionProfile = DistributionProfilePeer::retrieveByPK($object->getDistributionProfileId()); if ($distributionProfile) { $roots[] = $distributionProfile; } $entry = entryPeer::retrieveByPK($object->getEntryId()); if ($entry) { $roots[] = $entry; } return $roots; }
public function getRootObjects(IRelatedObject $object) { /* @var $object LiveChannelSegment */ return array($object->getChannel()); }
public function getRootObjects(IRelatedObject $object) { /* @var $object asset */ $entry = $object->getentry(); if ($entry) { return array($entry); } return array(); }
public function isReferenced(IRelatedObject $object) { /* @var $object Metadata */ if ($object->getObjectType() == MetadataObjectType::DYNAMIC_OBJECT) { return true; } else { return false; } }
public function getRootObjects(IRelatedObject $object) { return array(kuserPeer::retrieveByPK($object->getKuserId()), kuserPeer::retrieveByPK($object->getKgroupId())); }
public function getRootObjects(IRelatedObject $object) { /* @var $object KuserToUserRole */ return array($object->getkuser(), $object->getUserRole()); }