- 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.
98 lines
2.3 KiB
PHP
98 lines
2.3 KiB
PHP
<?php
|
|
/*+***********************************************************************************
|
|
* The contents of this file are subject to the vtiger CRM Public License Version 1.0
|
|
* ("License"); You may not use this file except in compliance with the License
|
|
* The Original Code is: vtiger CRM Open Source
|
|
* The Initial Developer of the Original Code is vtiger.
|
|
* Portions created by vtiger are Copyright (C) vtiger.
|
|
* All Rights Reserved.
|
|
*************************************************************************************/
|
|
|
|
/**
|
|
* Base Model Class
|
|
*/
|
|
class Vtiger_Base_Model {
|
|
protected $valueMap;
|
|
|
|
/**
|
|
* Constructor
|
|
* @param Array $values
|
|
*/
|
|
function __construct($values=array()) {
|
|
$this->valueMap = $values;
|
|
}
|
|
|
|
/**
|
|
* Function to get the value for a given key
|
|
* @param $key
|
|
* @return Value for the given key
|
|
*/
|
|
public function get($key){
|
|
return $this->valueMap[$key];
|
|
}
|
|
|
|
/**
|
|
* Function to get the raw value for a given key
|
|
* @param $key
|
|
* @return Raw Value for the given key
|
|
*/
|
|
public function getRaw($key){
|
|
return $this->rawData[$key];
|
|
}
|
|
|
|
/**
|
|
* Function to get the value if its safe to use for SQL Query (column).
|
|
* @param <String> $key
|
|
* @param <Boolean> $skipEmpty - Skip the check if string is empty
|
|
* @return Value for the given key
|
|
*/
|
|
public function getForSql($key, $skipEmtpy=true) {
|
|
return Vtiger_Util_Helper::validateStringForSql($this->get($key), $skipEmtpy);
|
|
}
|
|
|
|
/**
|
|
* Function to set the value for a given key
|
|
* @param $key
|
|
* @param $value
|
|
* @return Vtiger_Base_Model
|
|
*/
|
|
public function set($key,$value){
|
|
$this->valueMap[$key] = $value;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Function to set all the values for the Object
|
|
* @param Array (key-value mapping) $values
|
|
* @return Vtiger_Base_Model
|
|
*/
|
|
public function setData($values){
|
|
$this->valueMap = $values;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* Function to get all the values of the Object
|
|
* @return Array (key-value mapping)
|
|
*/
|
|
public function getData(){
|
|
return $this->valueMap;
|
|
}
|
|
|
|
/**
|
|
* Function to check if the key exists.
|
|
* @param String $key
|
|
*/
|
|
public function has($key) {
|
|
return array_key_exists($key, $this->valueMap);
|
|
}
|
|
|
|
/**
|
|
* Function to check if the key is empty.
|
|
* @param type $key
|
|
*/
|
|
public function isEmpty($key) {
|
|
return (!isset($this->valueMap[$key]) || empty($this->valueMap[$key]));
|
|
}
|
|
|
|
} |