private static function getObjectTypeCacheKey(IRelatedObject $object) { $userRoles = kPermissionManager::getCurrentRoleIds(); sort($userRoles); $objectType = get_class($object); $partnerId = self::$cachedObject->getPartnerId(); $profileKey = self::$responseProfileKey; $protocol = infraRequestUtils::getProtocol(); $ksType = kCurrentContext::getCurrentSessionType(); $userRoles = implode('-', $userRoles); $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : ''; return "relate_rp{$profileKey}_p{$partnerId}_o{$objectType}_h{$protocol}_k{$ksType}_u{$userRoles}_w{$host}"; }
protected static function getRelatedObjectKey(IRelatedObject $object, $responseProfileKey = null) { $partnerId = $object->getPartnerId(); $objectType = get_class($object); if ($responseProfileKey) { return "{$partnerId}_{$objectType}_{$responseProfileKey}"; } return "{$partnerId}_{$objectType}"; }
protected static function getRelatedObjectKey(IRelatedObject $object) { $partnerId = $object->getPartnerId(); $objectType = get_class($object); return "{$partnerId}_{$objectType}"; }