|
@@ -1,18 +1,18 @@
|
|
|
<?php
|
|
<?php
|
|
|
|
|
|
|
|
-namespace ModulesGarden\Servers\KerioEmail\Core\Helper;
|
|
|
|
|
-
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\Events\Dispatcher;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\Http\JsonResponse;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\Http\RedirectResponse;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\Http\Response;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\ServiceLocator;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\DependencyInjection;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\ModuleConstants;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\Cache\CacheManager;
|
|
|
|
|
-use ModulesGarden\Servers\KerioEmail\Core\Logger\Entity;
|
|
|
|
|
-
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\json'))
|
|
|
|
|
|
|
+namespace ThurData\Servers\KerioEmail\Core\Helper;
|
|
|
|
|
+
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\Events\Dispatcher;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\Http\JsonResponse;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\Http\RedirectResponse;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\Http\Response;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\ServiceLocator;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\DependencyInjection;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\ModuleConstants;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\Cache\CacheManager;
|
|
|
|
|
+use ThurData\Servers\KerioEmail\Core\Logger\Entity;
|
|
|
|
|
+
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\json'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -26,11 +26,11 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\json'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\response'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\response'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* @param array $data
|
|
* @param array $data
|
|
|
- * @return \ModulesGarden\Servers\KerioEmail\Core\Http\Response
|
|
|
|
|
|
|
+ * @return \ThurData\Servers\KerioEmail\Core\Http\Response
|
|
|
*/
|
|
*/
|
|
|
function response(array $data = [])
|
|
function response(array $data = [])
|
|
|
{
|
|
{
|
|
@@ -38,11 +38,11 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\response'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\cache'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\cache'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* @param array $data
|
|
* @param array $data
|
|
|
- * @return \ModulesGarden\Servers\KerioEmail\Core\Interfaces\CacheManagerInterface
|
|
|
|
|
|
|
+ * @return \ThurData\Servers\KerioEmail\Core\Interfaces\CacheManagerInterface
|
|
|
*/
|
|
*/
|
|
|
function cache($key = null)
|
|
function cache($key = null)
|
|
|
{
|
|
{
|
|
@@ -50,7 +50,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\cache'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\redirect'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\redirect'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* @param array $data
|
|
* @param array $data
|
|
@@ -62,7 +62,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\redirect'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\redirectByUrl'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\redirectByUrl'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* @param array $data
|
|
* @param array $data
|
|
@@ -74,7 +74,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\redirectByUr
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\t'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\t'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* @param array $data
|
|
* @param array $data
|
|
@@ -86,7 +86,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\t'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\errorLog'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\errorLog'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
function errorLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_HIGHT, $reference = [])
|
|
function errorLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_HIGHT, $reference = [])
|
|
@@ -105,7 +105,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\errorLog'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\successLog'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\successLog'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
function successLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
function successLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
@@ -124,7 +124,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\successLog')
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\infoLog'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\infoLog'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
function infoLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
function infoLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
@@ -143,7 +143,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\infoLog'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\criticalLog'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\criticalLog'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
function criticalLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
function criticalLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
@@ -162,7 +162,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\criticalLog'
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\debugLog'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\debugLog'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
function debugLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
function debugLog($message = "", $request = [], $response = [], $vars = [], $beforeVars = [], $level = Entity::LEVEL_LOW, $reference = [])
|
|
@@ -181,7 +181,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\debugLog'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\sl'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\sl'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -205,7 +205,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\sl'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\di'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\di'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -232,7 +232,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\di'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\isAdmin'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\isAdmin'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -253,7 +253,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\isAdmin'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\getAdminDirName'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\getAdminDirName'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -279,7 +279,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\getAdminDirN
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\getModuleName'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\getModuleName'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -300,13 +300,13 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\getModuleNam
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\view'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\view'))
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
* main View Controler
|
|
* main View Controler
|
|
|
*
|
|
*
|
|
|
- * @return \ModulesGarden\Servers\KerioEmail\Core\UI\View
|
|
|
|
|
|
|
+ * @return \ThurData\Servers\KerioEmail\Core\UI\View
|
|
|
*/
|
|
*/
|
|
|
function view($template = null)
|
|
function view($template = null)
|
|
|
{
|
|
{
|
|
@@ -332,12 +332,12 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\view'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\viewIntegrationAddon'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\viewIntegrationAddon'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* View Integration Addon Controler
|
|
* View Integration Addon Controler
|
|
|
*
|
|
*
|
|
|
- * @return \ModulesGarden\Servers\KerioEmail\Core\UI\ViewIntegrationAddon
|
|
|
|
|
|
|
+ * @return \ThurData\Servers\KerioEmail\Core\UI\ViewIntegrationAddon
|
|
|
*/
|
|
*/
|
|
|
function viewIntegrationAddon($wrapperTemplate = null, $viewTemplate = null)
|
|
function viewIntegrationAddon($wrapperTemplate = null, $viewTemplate = null)
|
|
|
{
|
|
{
|
|
@@ -368,7 +368,7 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\viewIntegrat
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\convertStringToNamespace'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\convertStringToNamespace'))
|
|
|
{
|
|
{
|
|
|
function convertStringToNamespace($string)
|
|
function convertStringToNamespace($string)
|
|
|
{
|
|
{
|
|
@@ -376,15 +376,15 @@ if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\convertStrin
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if (!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\getRequest'))
|
|
|
|
|
|
|
+if (!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\getRequest'))
|
|
|
{
|
|
{
|
|
|
function getRequest()
|
|
function getRequest()
|
|
|
{
|
|
{
|
|
|
- return sl(\ModulesGarden\Servers\KerioEmail\Core\Http\Request::class);
|
|
|
|
|
|
|
+ return sl(\ThurData\Servers\KerioEmail\Core\Http\Request::class);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if(!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\fire'))
|
|
|
|
|
|
|
+if(!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\fire'))
|
|
|
{
|
|
{
|
|
|
/**
|
|
/**
|
|
|
* Fire event!
|
|
* Fire event!
|
|
@@ -401,7 +401,7 @@ if(!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\fire'))
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-if(!function_exists('\ModulesGarden\Servers\KerioEmail\Core\Helper\queue'))
|
|
|
|
|
|
|
+if(!function_exists('\ThurData\Servers\KerioEmail\Core\Helper\queue'))
|
|
|
{
|
|
{
|
|
|
function queue($job, $arguments)
|
|
function queue($job, $arguments)
|
|
|
{
|
|
{
|