当前位置: 首页>>代码示例>>PHP>>正文


PHP BaseObject::getStatus方法代码示例

本文整理汇总了PHP中BaseObject::getStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP BaseObject::getStatus方法的具体用法?PHP BaseObject::getStatus怎么用?PHP BaseObject::getStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BaseObject的用法示例。


在下文中一共展示了BaseObject::getStatus方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: objectAdded

 /**
  * @param BaseObject $object
  * @return bool true if should continue to the next consumer
  */
 public function objectAdded(BaseObject $object)
 {
     if (!$object instanceof FileSync || $object->getStatus() != FileSync::FILE_SYNC_STATUS_PENDING || $object->getFileType() != FileSync::FILE_SYNC_FILE_TYPE_FILE || $object->getDc() == kDataCenterMgr::getCurrentDcId()) {
         return true;
     }
     $c = new Criteria();
     $c->addAnd(FileSyncPeer::OBJECT_ID, $object->getObjectId());
     $c->addAnd(FileSyncPeer::VERSION, $object->getVersion());
     $c->addAnd(FileSyncPeer::OBJECT_TYPE, $object->getObjectType());
     $c->addAnd(FileSyncPeer::OBJECT_SUB_TYPE, $object->getObjectSubType());
     $c->addAnd(FileSyncPeer::ORIGINAL, '1');
     $original_filesync = FileSyncPeer::doSelectOne($c);
     if (!$original_filesync) {
         KalturaLog::err('Original filesync not found for object_id[' . $object->getObjectId() . '] version[' . $object->getVersion() . '] type[' . $object->getObjectType() . '] subtype[' . $object->getObjectSubType() . ']');
         return true;
     }
     $sourceFileUrl = $original_filesync->getExternalUrl();
     if (!$sourceFileUrl) {
         KalturaLog::err('External URL not found for filesync id [' . $object->getId() . ']');
         return true;
     }
     $job = kMultiCentersManager::addFileSyncImportJob($this->getEntryId($object), $object->getPartnerId(), $object->getId(), $sourceFileUrl);
     $job->setDc($object->getDc());
     $job->save();
     return true;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:30,代码来源:kMultiCentersSynchronizer.php

示例2: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     if ($object instanceof Metadata && in_array(MetadataPeer::STATUS, $modifiedColumns) && $object->getStatus() == Metadata::STATUS_INVALID) {
         return true;
     }
     return false;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:kMetadataObjectDeletedHandler.php

示例3: shouldConsumeCreatedEvent

 public function shouldConsumeCreatedEvent(BaseObject $object)
 {
     if ($object instanceof asset && $object->getStatus() == asset::FLAVOR_ASSET_STATUS_READY) {
         return true;
     }
     return false;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:7,代码来源:kContentDistributionFlowManager.php

示例4: shouldConsumeAddedEvent

 public function shouldConsumeAddedEvent(BaseObject $object)
 {
     if ($object instanceof FileSync && $object->getStatus() == FileSync::FILE_SYNC_STATUS_PENDING && $object->getFileType() == FileSync::FILE_SYNC_FILE_TYPE_FILE && $object->getDc() != kDataCenterMgr::getCurrentDcId() && $this->shouldSyncFileObjectType($object->getObjectType(), $object->getObjectSubType())) {
         return true;
     }
     return false;
 }
开发者ID:AdiTal,项目名称:server,代码行数:7,代码来源:kMultiCentersSynchronizer.php

示例5: shouldConsumeAddedEvent

 public function shouldConsumeAddedEvent(BaseObject $object)
 {
     if (class_exists('CaptionAsset') && $object instanceof CaptionAsset && CaptionSearchPlugin::isAllowedPartner($object->getPartnerId()) && $object->getStatus() == CaptionAsset::ASSET_STATUS_READY && $object->getLanguage() != CaptionAsset::MULTI_LANGUAGE) {
         return true;
     }
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:7,代码来源:kCaptionSearchFlowManager.php

示例6: objectCreated

 /**
  * @param BaseObject $object
  * @return bool true if should continue to the next consumer
  */
 public function objectCreated(BaseObject $object)
 {
     if ($object instanceof asset && $object->getStatus() == asset::FLAVOR_ASSET_STATUS_READY) {
         return self::onAssetReadyOrDeleted($object);
     }
     return true;
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:11,代码来源:kContentDistributionFlowManager.php

示例7: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     try {
         if ($object instanceof DropFolderFile && in_array(DropFolderFilePeer::STATUS, $modifiedColumns)) {
             if ($object->getStatus() == DropFolderFileStatus::PENDING) {
                 $folder = DropFolderPeer::retrieveByPK($object->getDropFolderId());
                 if ($folder->getFileHandlerType() == DropFolderFileHandlerType::CONTENT) {
                     return true;
                 }
             }
         } elseif ($object instanceof entry && in_array(entryPeer::STATUS, $modifiedColumns) && ($object->getStatus() == entryStatus::READY || $object->getStatus() == entryStatus::ERROR_CONVERTING)) {
             return true;
         }
     } catch (Exception $e) {
         KalturaLog::err('Failed to process shouldConsumeChangedEvent - ' . $e->getMessage());
     }
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:18,代码来源:kDropFolderEventsConsumer.php

示例8: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     try {
         if ($object instanceof DropFolderFile && ($object->getStatus() == DropFolderFileStatus::PENDING || $object->getStatus() == DropFolderFileStatus::PURGED) && in_array(DropFolderFilePeer::STATUS, $modifiedColumns)) {
             $folder = DropFolderPeer::retrieveByPK($object->getDropFolderId());
             if (!$folder) {
                 KalturaLog::err('Failed to process shouldConsumeChangedEvent - Failed to retrieve drop folder with ID ' . $object->getDropFolderId());
                 return false;
             }
             if ($folder->getFileHandlerType() == DropFolderXmlBulkUploadPlugin::getFileHandlerTypeCoreValue(DropFolderXmlFileHandlerType::XML)) {
                 return true;
             }
         }
     } catch (Exception $e) {
         KalturaLog::err('Failed to process shouldConsumeChangedEvent - ' . $e->getMessage());
     }
     return false;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:18,代码来源:kDropFolderXmlEventsConsumer.php

示例9: isTimedThumbAssetChangedToReady

 public static function isTimedThumbAssetChangedToReady(BaseObject $object, array $modifiedColumns)
 {
     if ($object instanceof timedThumbAsset && in_array(assetPeer::STATUS, $modifiedColumns) && $object->getStatus() == asset::ASSET_STATUS_READY) {
         return true;
     }
 }
开发者ID:kubrickfr,项目名称:server,代码行数:6,代码来源:kThumbCuePointManager.php

示例10: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     if ($object instanceof Permission && $object->getPartnerId() && in_array($object->getType(), self::$partnerLevelPermissionTypes) && in_array(PermissionPeer::STATUS, $modifiedColumns) && $object->getStatus() == PermissionStatus::ACTIVE) {
         return true;
     }
     return false;
 }
开发者ID:kubrickfr,项目名称:server,代码行数:7,代码来源:kMetadataObjectCopiedHandler.php

示例11: shouldConsumeChangedEvent

 public function shouldConsumeChangedEvent(BaseObject $object, array $modifiedColumns)
 {
     $noneValidStatuses = array(FileSync::FILE_SYNC_STATUS_DELETED, FileSync::FILE_SYNC_STATUS_PURGED);
     if ($object instanceof FileSync && $object->getLinkCount() && in_array(FileSyncPeer::STATUS, $modifiedColumns) && !in_array($object->getStatus(), $noneValidStatuses)) {
         return true;
     }
     return false;
 }
开发者ID:DBezemer,项目名称:server,代码行数:8,代码来源:kFileSyncUtils.class.php

示例12: setDisplayInSearch

 /**
 	Will set the 'display_in_search' field according to business-logic per object type
 	// kuser | kshow | entry
 	// for objects that are search worthy - search_text will hold text from relevant columns depending on the object type 
 */
 public static function setDisplayInSearch(BaseObject $obj, $parent_obj = null)
 {
     if ($obj == null) {
         return;
     }
     // update the displayInSearch with the logic above only when the object is new or null
     if ($obj->isNew() || $obj->getDisplayInSearch() === null) {
         $res = myPartnerUtils::shouldDisplayInSearch($obj->getPartnerId());
         $obj_id = $obj->getId();
         if ($obj_id && is_numeric($obj_id)) {
             self::setRes($res, $obj_id > entry::MINIMUM_ID_TO_DISPLAY);
         }
         if ($res) {
             if ($obj instanceof kuser) {
                 // if the status is not
                 self::setRes($res, $obj->getStatus() == KuserStatus::ACTIVE);
             } elseif ($obj instanceof kshow) {
                 self::setRes($res, $obj->getViewPermissions() == kshow::KSHOW_PERMISSION_EVERYONE || $obj->getViewPermissions() == null);
                 // if the viewPermission changed from kshow::KSHOW_PERMISSION_EVERYONE to something else
                 // update all entries
                 if ($res && $obj->isColumnModified(kshowPeer::VIEW_PERMISSIONS)) {
                     $entries = $obj->getentrys();
                     foreach ($entries as $entry) {
                         // run this code for each entry
                         self::setDisplayInSearch($entry, $obj);
                     }
                 }
             } elseif ($obj instanceof entry) {
                 // status=READY , type=MEDIACLIP, view permissions of kshow
                 self::setRes($res, true);
             } else {
                 throw new Exception("mySearchUtils::setDisplayInSearch - cannot handle objects of type " . get_class($obj));
             }
         }
         $obj->setDisplayInSearch($res);
     } else {
         // if not new - use the value from the object
         $res = $obj->getDisplayInSearch();
     }
     //	echo __METHOD__ . " (" . get_class ( $obj ) . ") res [$res]\n";
     $words = "";
     $fields_to_use = $obj->getColumnNames();
     foreach ($fields_to_use as $field) {
         $field_str = $obj->getByName($field, BasePeer::TYPE_FIELDNAME);
         //  call_user_func ( array ( $obj , $func_name ) );
         $words .= " " . $field_str;
     }
     $extra_invisible_data = null;
     if ($obj instanceof kshow) {
         $type = $obj->getType();
         if (empty($type)) {
             $type = kshow::KSHOW_TYPE_OTHER;
         }
         // add the category to the search
         $words .= " _CAT_" . $type;
     } elseif ($obj instanceof entry) {
         $extra_invisible_data = "_MEDIA_TYPE_" . $obj->getMediaType();
         $type = $obj->getType();
         // add the SEARCH_ENTRY_TYPE_RC to the words
         if ($type == entryType::MIX) {
             $extra_invisible_data .= " " . self::SEARCH_ENTRY_TYPE_RC;
         }
     }
     $prepared_text = self::prepareSearchText($words);
     $partner_id = $obj->getPartnerId();
     // if res == 1 - only for partner , if == 2 - also for kaltura network
     $obj->setSearchText(self::addPartner($partner_id, $prepared_text, $res, $extra_invisible_data));
 }
开发者ID:richhl,项目名称:kalturaCE,代码行数:73,代码来源:mySearchUtils.class.php

示例13: objectChanged

 public function objectChanged(BaseObject $object, array $modifiedColumns)
 {
     if ($object instanceof entry && in_array(entryPeer::STATUS, $modifiedColumns) && ($object->getStatus() == entryStatus::READY || $object->getStatus() == entryStatus::ERROR_CONVERTING) && $object->getReplacedEntryId()) {
         kFlowHelper::handleEntryReplacement($object);
         return true;
     }
     if ($object instanceof UploadToken && in_array(UploadTokenPeer::STATUS, $modifiedColumns) && $object->getStatus() == UploadToken::UPLOAD_TOKEN_FULL_UPLOAD) {
         kFlowHelper::handleUploadFinished($object);
         return true;
     }
     if ($object instanceof BatchJob && $object->getJobType() == BatchJobType::BULKUPLOAD && $object->getStatus() == BatchJob::BATCHJOB_STATUS_ABORTED && in_array(BatchJobPeer::STATUS, $modifiedColumns) && in_array($object->getColumnsOldValue(BatchJobPeer::STATUS), BatchJobPeer::getClosedStatusList())) {
         $partner = $object->getPartner();
         if ($partner->getEnableBulkUploadNotificationsEmails()) {
             kFlowHelper::sendBulkUploadNotificationEmail($object, MailType::MAIL_TYPE_BULKUPLOAD_ABORTED, array($partner->getAdminName(), $object->getId(), kFlowHelper::createBulkUploadLogUrl($object)));
         }
         return true;
     }
     if ($object instanceof UserRole && in_array(UserRolePeer::PERMISSION_NAMES, $modifiedColumns)) {
         $filter = new kuserFilter();
         $filter->set('_eq_role_ids', $object->getId());
         kJobsManager::addIndexJob($object->getPartnerId(), IndexObjectType::USER, $filter, false);
         return true;
     }
     if ($object instanceof FileSync) {
         $c = new Criteria();
         $c->add(BatchJobLockPeer::OBJECT_ID, $object->getId());
         $c->add(BatchJobLockPeer::OBJECT_TYPE, BatchJobObjectType::FILE_SYNC);
         $c->add(BatchJobLockPeer::JOB_TYPE, BatchJobType::FILESYNC_IMPORT);
         $c->add(BatchJobLockPeer::STATUS, array(BatchJob::BATCHJOB_STATUS_RETRY, BatchJob::BATCHJOB_STATUS_PENDING), Criteria::IN);
         $fileSyncImportJobs = BatchJobLockPeer::doSelect($c);
         foreach ($fileSyncImportJobs as $fileSyncImportJob) {
             kJobsManager::abortDbBatchJob(BatchJobPeer::retrieveByPK($fileSyncImportJob->getId()));
         }
         return true;
     }
     if (!$object instanceof flavorAsset || !in_array(assetPeer::STATUS, $modifiedColumns)) {
         return true;
     }
     $entry = entryPeer::retrieveByPKNoFilter($object->getEntryId());
     KalturaLog::info("Asset id [" . $object->getId() . "] isOriginal [" . $object->getIsOriginal() . "] status [" . $object->getStatus() . "]");
     if ($object->getIsOriginal()) {
         return true;
     }
     if ($object->getStatus() == flavorAsset::FLAVOR_ASSET_STATUS_VALIDATING) {
         $postConvertAssetType = BatchJob::POSTCONVERT_ASSET_TYPE_FLAVOR;
         $offset = $entry->getThumbOffset();
         // entry getThumbOffset now takes the partner DefThumbOffset into consideration
         $syncKey = $object->getSyncKey(asset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
         $fileSync = kFileSyncUtils::getLocalFileSyncForKey($syncKey, false);
         if (!$fileSync) {
             return true;
         }
         $srcFileSyncLocalPath = kFileSyncUtils::getLocalFilePathForKey($syncKey);
         if ($srcFileSyncLocalPath) {
             kJobsManager::addPostConvertJob(null, $postConvertAssetType, $srcFileSyncLocalPath, $object->getId(), null, $entry->getCreateThumb(), $offset);
         }
     } elseif ($object->getStatus() == flavorAsset::FLAVOR_ASSET_STATUS_READY) {
         // If we get a ready flavor and the entry is in no content
         if ($entry->getStatus() == entryStatus::NO_CONTENT) {
             $entry->setStatus(entryStatus::PENDING);
             // we change the entry to pending
             $entry->save();
         }
     }
     return true;
 }
开发者ID:DBezemer,项目名称:server,代码行数:66,代码来源:kFlowManager.php

示例14: setDisplayInSearch

 /**
 	Will set the 'display_in_search' field according to business-logic per object type
 	// kuser | kshow | entry
 	// for objects that are search worthy - search_text will hold text from relevant columns depending on the object type 
 */
 public static function setDisplayInSearch(BaseObject $obj, $parent_obj = null)
 {
     if ($obj == null) {
         return;
     }
     // update the displayInSearch with the logic above only when the object is new or null
     if ($obj->isNew() || $obj->getDisplayInSearch() === null) {
         $res = myPartnerUtils::shouldDisplayInSearch($obj->getPartnerId());
         $obj_id = $obj->getId();
         if ($obj_id && is_numeric($obj_id)) {
             self::setRes($res, $obj_id > entry::MINIMUM_ID_TO_DISPLAY);
         }
         if ($res) {
             if ($obj instanceof kuser) {
                 // if the status is not
                 self::setRes($res, $obj->getStatus() == KuserStatus::ACTIVE);
             } elseif ($obj instanceof kshow) {
                 self::setRes($res, $obj->getViewPermissions() == kshow::KSHOW_PERMISSION_EVERYONE || $obj->getViewPermissions() == null);
                 // if the viewPermission changed from kshow::KSHOW_PERMISSION_EVERYONE to something else
                 // update all entries
                 if ($res && $obj->isColumnModified(kshowPeer::VIEW_PERMISSIONS)) {
                     $entries = $obj->getentrys();
                     foreach ($entries as $entry) {
                         // run this code for each entry
                         self::setDisplayInSearch($entry, $obj);
                     }
                 }
             } elseif ($obj instanceof entry) {
                 // status=READY , type=MEDIACLIP, view permissions of kshow
                 self::setRes($res, true);
             } else {
                 throw new Exception("mySearchUtils::setDisplayInSearch - cannot handle objects of type " . get_class($obj));
             }
         }
         $obj->setDisplayInSearch($res);
     }
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:42,代码来源:mySearchUtils.class.php


注:本文中的BaseObject::getStatus方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。