Files
api/services/nginx/app/modules/ocrSpace/ocrSpace_c.php
T
Jeppe Bundgaard 69ceafcce6 Add OCR Space module with configuration and image processing support
- Introduced `ocrSpace` module with classes: `ocr_space`, `ocrSpace_c`, and configuration objects for `enabled` and `api_key`.
- Added routes for fetching and updating OCR Space configuration.
- Created `image_processor` class and interface for handling and processing base64-encoded images.
- Integrated new traits and classes for image validation and processing.
- Updated `index.php` to include `ocr_space` and `image_processor`.
2025-08-06 10:27:39 +02:00

36 lines
895 B
PHP

<?php
namespace ocrSpace;
require_once WD . '/modules/ocrSpace/config/ocrSpace_enabled_c.php';
require_once WD . '/modules/ocrSpace/config/ocrSpace_api_key_c.php';
use ocrSpace\config\ocrSpace_enabled_c;
use ocrSpace\config\ocrSpace_api_key_c;
use traits\module_config_t;
class ocrSpace_c
{
use module_config_t;
/**
* The status of ocrSpace, whether it is enabled or not
* @var ocrSpace_enabled_c
*/
public ocrSpace_enabled_c $enabled;
/**
* The API key for ocrSpace
* @var ocrSpace_api_key_c
*/
public ocrSpace_api_key_c $api_key;
public function __construct()
{
$this->setupConfig('ocrSpace');
$this->allowUpdate([
ocrSpace_enabled_c::class,
ocrSpace_api_key_c::class,
]);
$this->enabled = new ocrSpace_enabled_c();
$this->api_key = new ocrSpace_api_key_c();
}
}