xref: /plugin/totext/Extractor/ExtractorInterface.php (revision 0fbee1892eb8b7339ce48e27e48e3fc821a8695f)
1<?php
2
3namespace dokuwiki\plugin\totext\Extractor;
4
5/**
6 * Contract for all format-specific text extractors.
7 */
8interface ExtractorInterface
9{
10    /**
11     * Extract body text and metadata from the given file.
12     *
13     * @param string $path absolute path to the file
14     * @return ExtractionResult the extracted body text and canonical metadata
15     * @throws \dokuwiki\plugin\totext\Exception\ExtractionException on I/O or parse failure
16     */
17    public function extract(string $path): ExtractionResult;
18}
19