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


PHP PartnerPeer::resetPartnerInCache方法代码示例

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


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

示例1: execute

 public function execute()
 {
     ini_set("memory_limit", "64M");
     $this->forceSystemAuthentication();
     myDbHelper::$use_alternative_con = null;
     $partner_id = $this->getP("partner_id");
     $search_text = $this->getP("search_text");
     $command = $this->getP("command");
     if ($command == "removeCache") {
         PartnerPeer::resetPartnerInCache($partner_id);
         return $this->renderText("Removed partner [{$partner_id}] from cache");
     } elseif ($command == "save") {
         $partner = new Partner();
         $pw = objectWrapperBase::getWrapperClass($partner, 0);
         $extra_fields = array("partnerName", "description", "adminName", "adminEmail", "useDefaultKshow", "conversionString", "flvConversionString", "allowQuickEdit", "shouldForceUniqueKshow", "returnDuplicateKshow", "notificationsConfig", "notify", "allowMultiNotification", "appearInSearch", "mergeEntryLists", "allowLks", "allowAnonymousRanking", "isFirstLogin", "matchIp", "host", "cdnHost", "rtmpUrl", "defThumbOffset", "defThumbDensity", "landingPage", "userLandingPage", "status", "serviceConfigId", "moderateContent", "currentConversionProfileType", "monitorUsage", "templatePartnerId", "addEntryMaxFiles", "defaultConversionProfileId", "partnerGroupType", "partnerParentId", "enableAnalyticsTab", "liveStreamEnabled", "storageServePriority", "storageDeleteFromKaltura", "enableSilverLight", "partnerSpecificServices", "partnerSpecificServices", "enable508Players", "enableVast", "appStudioExampleEntry", "appStudioExamplePlayList0", "appStudioExamplePlayList1", "delivryBlockCountries", "deliveryRestrictions", "maxLoginAttempts", "loginBlockPeriod", "numPrevPassToKeep", "passReplaceFreq");
         $allowed_params = array_merge($pw->getUpdateableFields(), $extra_fields);
         $fields_modified = baseObjectUtils::fillObjectFromMap($_REQUEST, $partner, "partner_", $allowed_params, BasePeer::TYPE_PHPNAME, true);
         if (!isset($_REQUEST['partner_partnerParentId']) || $_REQUEST['partner_partnerParentId'] == '') {
             $partner->setPartnerParentId(null);
         }
         $partner_from_db = PartnerPeer::retrieveByPK($partner_id);
         if ($partner_from_db) {
             baseObjectUtils::fillObjectFromObject($allowed_params, $partner, $partner_from_db, baseObjectUtils::CLONE_POLICY_PREFER_NEW, null, BasePeer::TYPE_PHPNAME, true);
         }
         if (class_exists('MetadataPlugin')) {
             $partner_from_db->setPluginEnabled(MetadataPlugin::PLUGIN_NAME, $_REQUEST['partner_enableMetadata']);
         }
         if (class_exists('AuditPlugin')) {
             $partner_from_db->setPluginEnabled(AuditPlugin::PLUGIN_NAME, $_REQUEST['partner_enableAuditTrail']);
         }
         if (class_exists('AnnotationPlugin')) {
             $partner_from_db->setPluginEnabled(AnnotationPlugin::PLUGIN_NAME, $_REQUEST['partner_enableAnnotation']);
         }
         if (class_exists('VirusScanPlugin')) {
             $partner_from_db->setPluginEnabled(VirusScanPlugin::PLUGIN_NAME, $_REQUEST['partner_enableVirusScan']);
         }
         if ($partner_from_db->getServiceConfigId() == "") {
             $partner_from_db->setServiceConfigId(null);
         }
         if ($partner_from_db->getPartnerParentId() == -1000) {
             $partner_from_db->setPartnerParentId(null);
         }
         $partner_from_db->save();
         //			PartnerPeer::resetPartnerInCache ( $partner_id);
     }
     $c = new Criteria();
     if (true) {
         $c->add(PartnerPeer::ID, $partner_id);
     }
     if ($search_text) {
         $crit = $c->getNewCriterion(PartnerPeer::PARTNER_NAME, "%{$search_text}%", Criteria::LIKE);
         $crit->addOr($c->getNewCriterion(PartnerPeer::DESCRIPTION, "%{$search_text}%", Criteria::LIKE));
         $c->addAnd($crit);
     }
     $c->setLimit(1);
     //$this->partner = PartnerPeer::retrieveByPK( $partner_id );
     $this->partner_list = PartnerPeer::doSelect($c);
     if (count($this->partner_list) == 1) {
         $this->partner = $this->partner_list[0];
     } else {
         $this->partner = null;
     }
     $this->partner_id = $partner_id;
     $this->search_text = $search_text;
 }
开发者ID:EfncoPlugins,项目名称:Media-Management-based-on-Kaltura,代码行数:65,代码来源:partnersAction.class.php


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