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

63 lines
1.6 KiB
PHP
Raw Normal View History

2014-07-16 02:45:15 +08:00
<?php
namespace RainLoop;
class KeyPathHelper
{
2020-03-16 20:08:53 +08:00
static public function PublicFile(string $sHash) : string
2014-11-07 01:52:07 +08:00
{
return '/Public/Files/'.sha1($sHash).'/Data/';
2014-11-07 01:52:07 +08:00
}
static public function SsoCacherKey(string $sSsoHash) : string
2014-07-16 02:45:15 +08:00
{
return '/Sso/Data/'.$sSsoHash.'/Login/';
}
static public function RsaCacherKey(string $sHash) : string
{
return '/Rsa/Data/'.$sHash.'/';
}
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
}
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
}
static public function ReadReceiptCache(string $sEmail, string $sFolderFullName, string $sUid) : string
2014-07-16 02:45:15 +08:00
{
return '/ReadReceipt/'.$sEmail.'/'.$sFolderFullName.'/'.$sUid;
}
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
}
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.'/';
}
static public function PluginsJsCache(string $sPluginsHash) : string
2014-07-16 02:45:15 +08:00
{
return '/PluginsJsCache/'.$sPluginsHash.'/'.APP_VERSION.'/';
}
static public function CssCache(string $sTheme, string $sHash) : string
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
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
}