- 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.
101 lines
2.5 KiB
PHP
101 lines
2.5 KiB
PHP
<?php
|
|
/**
|
|
* Created by JetBrains PhpStorm.
|
|
* User: Stefan Warnat <support@stefanwarnat.de>
|
|
* Date: 04.06.14 15:48
|
|
* You must not use this file without permission.
|
|
*/
|
|
namespace Workflow;
|
|
|
|
abstract class InterfaceFiles extends Extendable {
|
|
|
|
protected $title = 'Attachments';
|
|
protected $key = 'attachment';
|
|
|
|
public function getTitle() {
|
|
return $this->title;
|
|
}
|
|
public function getKey() {
|
|
return $this->key;
|
|
}
|
|
|
|
|
|
public static function getAvailableFiles($moduleName) {
|
|
$interfaces = self::getItems();
|
|
|
|
$return = array();
|
|
foreach($interfaces as $interface) {
|
|
/**
|
|
* @var $interface InterfaceFiles
|
|
*/
|
|
$files = $interface->_listAvailableFiles($moduleName);
|
|
|
|
foreach($files as $key => $file) {
|
|
$return[$interface->getTitle()][$key] = $file;
|
|
}
|
|
}
|
|
|
|
return $return;
|
|
}
|
|
|
|
|
|
public static function getFile($id, $moduleName, $crmid) {
|
|
self::init();
|
|
$parts = explode('#', $id, 2);
|
|
|
|
$interface = self::getItem($parts[0]);
|
|
/**
|
|
* @var $interface \Workflow\InterfaceFiles
|
|
*/
|
|
if($interface === false) {
|
|
throw new \Exception('Type "'.$parts[0].'" of Attachment not available. Please remove this file in configuration!');
|
|
}
|
|
|
|
$filepath = $interface->_getFile($parts[1], $moduleName, $crmid);
|
|
|
|
return $filepath;
|
|
}
|
|
|
|
public static function init() {
|
|
self::_init(dirname(__FILE__).'/../../extends/interfaceFiles');
|
|
}
|
|
|
|
protected function _getTmpFilename() {
|
|
return tempnam(dirname(__FILE__).'/../../tmp/', 'WORKLFOW');
|
|
}
|
|
|
|
private function _listAvailableFiles($moduleName) {
|
|
self::init();
|
|
|
|
$files = $this->_getAvailableFiles($moduleName);
|
|
if(!is_array($files)) {
|
|
return array();
|
|
}
|
|
|
|
$return = array();
|
|
foreach($files as $index => $file) {
|
|
$return[$this->getKey().'#'.$index] = $file;
|
|
}
|
|
|
|
return $return;
|
|
}
|
|
/**
|
|
* Create the file and return the following:
|
|
* array(
|
|
* 'path' => PAth The temporary file,
|
|
* 'name' => Filename of this file
|
|
* 'type' => MIME Type of this file
|
|
* )
|
|
*
|
|
* @return array
|
|
*/
|
|
abstract protected function _getFile($id, $moduleName, $crmid);
|
|
|
|
/**
|
|
* @param $moduleName string
|
|
* @return array
|
|
*/
|
|
abstract protected function _getAvailableFiles($moduleName);
|
|
}
|
|
|
|
?>
|