2014-07-16 02:45:15 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace RainLoop;
|
|
|
|
|
|
|
|
class KeyPathHelper
|
|
|
|
{
|
2020-03-16 20:08:53 +08:00
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function PublicFile(string $sHash) : string
|
2014-11-07 01:52:07 +08:00
|
|
|
{
|
2014-11-08 04:21:10 +08:00
|
|
|
return '/Public/Files/'.sha1($sHash).'/Data/';
|
2014-11-07 01:52:07 +08:00
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function SsoCacherKey(string $sSsoHash) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
|
|
|
return '/Sso/Data/'.$sSsoHash.'/Login/';
|
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function RsaCacherKey(string $sHash) : string
|
2014-07-26 00:05:20 +08:00
|
|
|
{
|
|
|
|
return '/Rsa/Data/'.$sHash.'/';
|
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function RepositoryCacheFile(string $sRepo, string $sRepoFile) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
2014-07-31 00:01:02 +08:00
|
|
|
return '/RepositoryCache/Repo/'.$sRepo.'/File/'.$sRepoFile;
|
2014-07-16 02:45:15 +08:00
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function RepositoryCacheCore(string $sRepo) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
2014-07-31 00:01:02 +08:00
|
|
|
return '/RepositoryCache/CoreRepo/'.$sRepo;
|
2014-07-16 02:45:15 +08:00
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function ReadReceiptCache(string $sEmail, string $sFolderFullName, string $sUid) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
|
|
|
return '/ReadReceipt/'.$sEmail.'/'.$sFolderFullName.'/'.$sUid;
|
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function LangCache(string $sLanguage, bool $bAdmim, string $sPluginsHash) : string
|
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
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function TemplatesCache(bool $bAdmin, string $sPluginsHash) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
|
|
|
return '/TemplatesCache/'.$sPluginsHash.'/'.($bAdmin ? 'Admin' : 'App').'/'.APP_VERSION.'/';
|
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function PluginsJsCache(string $sPluginsHash) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
|
|
|
return '/PluginsJsCache/'.$sPluginsHash.'/'.APP_VERSION.'/';
|
|
|
|
}
|
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function CssCache(string $sTheme, string $sHash) : string
|
2014-07-16 02:45:15 +08:00
|
|
|
{
|
2015-02-05 07:54:26 +08:00
|
|
|
return '/CssCache/'.$sHash.'/'.$sTheme.'/'.APP_VERSION.'/';
|
2014-07-16 02:45:15 +08:00
|
|
|
}
|
2015-02-15 08:30:21 +08:00
|
|
|
|
2020-03-10 00:04:17 +08:00
|
|
|
static public function SessionAdminKey(string $sRand) : string
|
2015-02-15 08:30:21 +08:00
|
|
|
{
|
|
|
|
return '/Session/AdminKey/'.\md5($sRand).'/';
|
|
|
|
}
|
2014-07-16 02:45:15 +08:00
|
|
|
}
|