```php title="PHP" 'Extracted text from image', 'mime_type' => 'image/png', 'metadata' => ['ocr_engine' => 'custom-ocr'], 'tables' => [], 'detected_languages' => ['eng'], ]; } public function processImageFile(string $path, object $config): object { // Read file and delegate to processImage $imageBytes = file_get_contents($path); return $this->processImage($imageBytes, $config); } public function supportsLanguage(string $lang): bool { return in_array($lang, $this->supportedLangs); } public function backendType(): string { return "OCREngine"; } public function supportedLanguages(): array { return $this->supportedLangs; } public function supportsTableDetection(): bool { return true; } public function supportsDocumentProcessing(): bool { return false; } public function processDocument(string $path, object $config): object { throw new Exception("Document processing not supported"); } } // Register the custom OCR backend $backend = new CustomOcrBackend(); Kreuzberg::registerOcrBackend($backend); echo "Custom OCR backend registered\n"; ```