snappymail/rainloop/v/0.0.0/app/libraries/RainLoop/KeyPathHelper.php

145 lines
2.6 KiB
PHP
Raw Normal View History

2014-07-16 02:45:15 +08:00
<?php
namespace RainLoop;
class KeyPathHelper
{
2014-11-07 01:52:07 +08:00
/**
* @param string $sHash
2014-11-07 01:52:07 +08:00
*
* @return string
*/
static public function PublicFile($sHash)
2014-11-07 01:52:07 +08:00
{
return '/Public/Files/'.sha1($sHash).'/Data/';
2014-11-07 01:52:07 +08:00
}
2014-07-16 02:45:15 +08:00
/**
* @param string $sSsoHash
*
* @return string
*/
static public function SsoCacherKey($sSsoHash)
{
return '/Sso/Data/'.$sSsoHash.'/Login/';
}
/**
* @param string $sHash
*
* @return string
*/
static public function RsaCacherKey($sHash)
{
return '/Rsa/Data/'.$sHash.'/';
}
2014-07-16 02:45:15 +08:00
/**
* @param string $sDomain
*
* @return string
*/
static public function LicensingDomainKeyValue($sDomain)
{
2014-07-31 00:01:02 +08:00
return '/Licensing/DomainKey/Value/'.$sDomain;
2014-07-16 02:45:15 +08:00
}
2014-10-24 01:59:21 +08:00
/**
* @param string $sDomain
*
* @return string
*/
static public function LicensingDomainKeyOtherValue($sDomain)
{
return '/Licensing/DomainKeyOther/Value/'.$sDomain;
}
2014-07-16 02:45:15 +08:00
/**
* @param string $sRepo
* @param string $sRepoFile
*
* @return string
*/
static public function RepositoryCacheFile($sRepo, $sRepoFile)
{
2014-07-31 00:01:02 +08:00
return '/RepositoryCache/Repo/'.$sRepo.'/File/'.$sRepoFile;
2014-07-16 02:45:15 +08:00
}
/**
* @param string $sRepo
*
* @return string
*/
static public function RepositoryCacheCore($sRepo)
{
2014-07-31 00:01:02 +08:00
return '/RepositoryCache/CoreRepo/'.$sRepo;
2014-07-16 02:45:15 +08:00
}
/**
* @param string $sEmail
* @param string $sFolderFullName
* @param string $sUid
*
* @return string
*/
static public function ReadReceiptCache($sEmail, $sFolderFullName, $sUid)
{
return '/ReadReceipt/'.$sEmail.'/'.$sFolderFullName.'/'.$sUid;
}
/**
* @param string $sLanguage
2015-03-28 06:06:56 +08:00
* @param bool $bAdmim
2014-07-16 02:45:15 +08:00
* @param string $sPluginsHash
*
* @return string
*/
2015-03-28 06:06:56 +08:00
static public function LangCache($sLanguage, $bAdmim, $sPluginsHash)
2014-07-16 02:45:15 +08:00
{
2015-03-28 06:06:56 +08:00
return '/LangCache/'.$sPluginsHash.'/'.$sLanguage.'/'.($bAdmim ? 'Admin' : 'App').'/'.APP_VERSION.'/';
2014-07-16 02:45:15 +08:00
}
/**
* @param bool $bAdmin
* @param string $sPluginsHash
*
* @return string
*/
static public function TemplatesCache($bAdmin, $sPluginsHash)
{
return '/TemplatesCache/'.$sPluginsHash.'/'.($bAdmin ? 'Admin' : 'App').'/'.APP_VERSION.'/';
}
/**
* @param string $sPluginsHash
*
* @return string
*/
static public function PluginsJsCache($sPluginsHash)
{
return '/PluginsJsCache/'.$sPluginsHash.'/'.APP_VERSION.'/';
}
/**
* @param string $sTheme
* @param string $sHash
2014-11-20 05:32:20 +08:00
* @param string $sPublickHash
2014-07-16 02:45:15 +08:00
*
* @return string
*/
static public function CssCache($sTheme, $sHash)
2014-07-16 02:45:15 +08:00
{
return '/CssCache/'.$sHash.'/'.$sTheme.'/'.APP_VERSION.'/';
2014-07-16 02:45:15 +08:00
}
2015-02-15 08:30:21 +08:00
/**
* @param string $sRand
*
* @return string
*/
static public function SessionAdminKey($sRand)
{
return '/Session/AdminKey/'.\md5($sRand).'/';
}
2014-07-16 02:45:15 +08:00
}