- 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`.
29 lines
482 B
PHP
29 lines
482 B
PHP
<?php
|
|
|
|
namespace ocrSpace\config;
|
|
|
|
use Exception;
|
|
use traits\module_config_variable;
|
|
|
|
class ocrSpace_enabled_c
|
|
{
|
|
use module_config_variable;
|
|
|
|
/**
|
|
* @throws Exception
|
|
*/
|
|
public function __construct()
|
|
{
|
|
self::setupConfigVariable(
|
|
'ocrSpace',
|
|
'enabled',
|
|
'bool',
|
|
true,
|
|
null,
|
|
'Whether ocrSpace is enabled',
|
|
'1',
|
|
false,
|
|
'false'
|
|
);
|
|
}
|
|
} |