- Added comprehensive AI Assistant system (aiassist/ directory): * Vector search and embedding capabilities * Typebot proxy integration * Elastic search functionality * Message classification and chat history * MCP proxy for external integrations - Implemented Court Status API (GetCourtStatus.php): * Real-time court document status checking * Integration with external court systems * Comprehensive error handling and logging - Enhanced S3 integration: * Improved file backup system with metadata * Batch processing capabilities * Enhanced error logging and recovery * Copy operations with URL fixing - Added Telegram contact creation API - Improved error logging across all modules - Enhanced callback system for AI responses - Extensive backup file storage with timestamps - Updated documentation and README files - File storage improvements: * Thousands of backup files with proper metadata * Fix operations for broken file references * Project-specific backup and recovery systems * Comprehensive file integrity checking Total: 26,461+ files added/modified including AWS SDK, vendor dependencies, and extensive backup system.
65 lines
1.6 KiB
PHP
65 lines
1.6 KiB
PHP
<?php
|
|
/**
|
|
* Created by PhpStorm.
|
|
* User: Stefan
|
|
* Date: 18.12.2016
|
|
* Time: 20:37
|
|
*/
|
|
|
|
namespace Workflow;
|
|
|
|
|
|
class Emailtemplates
|
|
{
|
|
private static $Register = array();
|
|
private static $_initialized = false;
|
|
|
|
public static function register($callable, $groupName) {
|
|
if(!is_callable(array($callable, 'getAllTemplates'))) return;
|
|
|
|
self::$Register[$callable] = array(
|
|
'class' => $callable,
|
|
'group' => $groupName
|
|
);
|
|
}
|
|
|
|
private function init() {
|
|
if(self::$_initialized === false) {
|
|
$alle = glob(dirname(__FILE__).'/../../extends/emailtemplates/*.inc.php');
|
|
foreach($alle as $datei) { include_once(realpath($datei)); }
|
|
}
|
|
|
|
}
|
|
|
|
public function getAllTemplates($moduleName) {
|
|
$this->init();
|
|
|
|
$return = array();
|
|
foreach(self::$Register as $hash => $callable) {
|
|
$result = call_user_func_array(array($callable['class'], 'getAllTemplates'), array($moduleName));
|
|
|
|
if(!empty($result)) {
|
|
$final = array();
|
|
foreach($result as $id => $name) {
|
|
$final['s#V2#'.$hash.'-'.$id] = $name;
|
|
}
|
|
|
|
$return[$callable['group']] = $final;
|
|
}
|
|
}
|
|
|
|
return $return;
|
|
}
|
|
|
|
public function getTemplate($key, VTEntity $context) {
|
|
$key = str_replace('s#V2#', '', $key);
|
|
$parts = explode('-', $key);
|
|
|
|
$this->init();
|
|
$callable = self::$Register[$parts[0]]['class'];
|
|
|
|
$result = call_user_func_array(array($callable, 'getTemplate'), array($parts[1], $context));
|
|
|
|
return $result;
|
|
}
|
|
} |