protected function applyDynamicValues(kScope $scope) { parent::applyDynamicValues($scope); $dynamicValues = $scope->getDynamicValues('{', '}'); if (is_array($dynamicValues) && count($dynamicValues)) { $this->xPath = str_replace(array_keys($dynamicValues), $dynamicValues, $this->xPath); if ($this->profileSystemName) { $this->profileSystemName = str_replace(array_keys($dynamicValues), $dynamicValues, $this->profileSystemName); } } }
protected function internalFulfilled(kScope $scope) { $referrer = $scope->getReferrer(); if ($this->getNot() === true && !$this->globalWhitelistDomainsAppended && strpos($referrer, "kwidget") === false && kConf::hasParam("global_whitelisted_domains")) { $ks = $scope->getKs(); if (!$ks || !in_array($ks->partner_id, kConf::get('global_whitelisted_domains_exclude'))) { $this->globalWhitelistDomainsAppended = true; $globalWhitelistedDomains = kConf::get("global_whitelisted_domains"); if (!is_array($globalWhitelistedDomains)) { $globalWhitelistedDomains = explode(',', $globalWhitelistedDomains); } foreach ($globalWhitelistedDomains as $globalWhitelistedDomain) { $this->values[] = new kStringValue($globalWhitelistedDomain); } } } kApiCache::addExtraField(kApiCache::ECF_REFERRER, kApiCache::COND_SITE_MATCH, $this->getStringValues($scope)); return parent::internalFulfilled($scope); }
public function __construct($not = false) { $this->setType(ConditionType::IP_ADDRESS); parent::__construct($not); }
public function __construct($not = false) { $this->setType(MetadataPlugin::getConditionTypeCoreValue(MetadataConditionType::METADATA_FIELD_MATCH)); parent::__construct($not); }
protected function matches($field, $value) { return parent::matches(trim(strtolower($field), " \n\r\t"), trim(strtolower($value), " \n\r\t")); }
public function __construct($not = false) { $this->setType(ConditionType::FIELD_MATCH); parent::__construct($not); }
public function __construct($not = false) { $this->setType(ConditionType::GEO_DISTANCE); parent::__construct($not); }