- 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.
81 lines
1.8 KiB
PHP
81 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace PrintNode;
|
|
|
|
class ApiKeyCredentials implements Credentials
|
|
{
|
|
private $apikey;
|
|
private $child_header = array();
|
|
private $other_headers = array();
|
|
|
|
|
|
public function setChildAccountById($id)
|
|
{
|
|
$this->child_header = array("X-Child-Account-By-Id: ".$id);
|
|
}
|
|
|
|
public function setChildAccountByEmail($email)
|
|
{
|
|
$this->child_header = array("X-Child-Account-By-Email: ".$email);
|
|
}
|
|
|
|
public function setChildAccountByCreatorRef($creatorRef)
|
|
{
|
|
$this->child_header = array("X-Child-Account-By-CreatorRef: ".$creatorRef);
|
|
}
|
|
|
|
public function getHeaders()
|
|
{
|
|
return array_merge($this->child_header,$this->other_headers);
|
|
}
|
|
|
|
public function __construct($apikey)
|
|
{
|
|
$this->apikey = $apikey;
|
|
}
|
|
|
|
/**
|
|
* return correct authentcation method
|
|
* @param void
|
|
* @return string
|
|
* */
|
|
public function __toString()
|
|
{
|
|
return ($this->apikey . ':');
|
|
}
|
|
|
|
public function __set($propertyName, $value)
|
|
{
|
|
if (!property_exists($this, $propertyName)) {
|
|
throw new \InvalidArgumentException(
|
|
sprintf(
|
|
'%s does not have a property named %s',
|
|
get_class($this),
|
|
$propertyName
|
|
)
|
|
);
|
|
}
|
|
$this->$propertyName = $value;
|
|
}
|
|
|
|
/**
|
|
* Get property on object
|
|
* @param mixed $propertyName
|
|
* @return mixed
|
|
* */
|
|
public function __get($propertyName)
|
|
{
|
|
if (!property_exists($this, $propertyName)) {
|
|
throw new \InvalidArgumentException(
|
|
sprintf(
|
|
'%s does not have a property named %s',
|
|
get_class($this),
|
|
$propertyName
|
|
)
|
|
);
|
|
}
|
|
|
|
return $this->$propertyName;
|
|
}
|
|
}
|