static function getInstanceByDbObject(kCondition $dbObject) { switch ($dbObject->getType()) { case ConditionType::AUTHENTICATED: return new KalturaAuthenticatedCondition(); case ConditionType::COUNTRY: return new KalturaCountryCondition(); case ConditionType::IP_ADDRESS: return new KalturaIpAddressCondition(); case ConditionType::SITE: return new KalturaSiteCondition(); case ConditionType::USER_AGENT: return new KalturaUserAgentCondition(); case ConditionType::FIELD_COMPARE: return new KalturaFieldCompareCondition(); case ConditionType::FIELD_MATCH: return new KalturaFieldMatchCondition(); case ConditionType::ASSET_PROPERTIES_COMPARE: return new KalturaAssetPropertiesCompareCondition(); case ConditionType::USER_ROLE: return new KalturaUserRoleCondition(); case ConditionType::GEO_DISTANCE: return new KalturaGeoDistanceCondition(); case ConditionType::OR_OPERATOR: return new KalturaOrCondition(); case ConditionType::HASH: return new KalturaHashCondition(); case ConditionType::DELIVERY_PROFILE: return new KalturaDeliveryProfileCondition(); case ConditionType::ACTIVE_EDGE_VALIDATE: return new KalturaValidateActiveEdgeCondition(); default: return KalturaPluginManager::loadObject('KalturaCondition', $dbObject->getType()); } }
static function getInstanceByDbObject(kCondition $dbObject) { switch ($dbObject->getType()) { case ConditionType::AUTHENTICATED: return new KalturaAuthenticatedCondition(); case ConditionType::COUNTRY: return new KalturaCountryCondition(); case ConditionType::IP_ADDRESS: return new KalturaIpAddressCondition(); case ConditionType::SITE: return new KalturaSiteCondition(); case ConditionType::USER_AGENT: return new KalturaUserAgentCondition(); case ConditionType::FIELD_COMPARE: return new KalturaFieldCompareCondition(); case ConditionType::FIELD_MATCH: return new KalturaFieldMatchCondition(); default: return KalturaPluginManager::loadObject('KalturaCondition', $dbObject->getType()); } }