1 | <?php |
||
31 | class ExtractingQuery extends Query |
||
32 | { |
||
33 | protected $file; |
||
34 | protected $multiPartPostDataBoundary; |
||
35 | |||
36 | /** |
||
37 | * Constructor |
||
38 | * |
||
39 | * @param string $file Absolute path to the file to extract content and meta data from. |
||
40 | */ |
||
41 | 1 | public function __construct($file) |
|
48 | |||
49 | /** |
||
50 | * Returns the boundary used for this multi-part form-data POST body data. |
||
51 | * |
||
52 | * @return string multi-part form-data POST boundary |
||
53 | */ |
||
54 | 1 | public function getMultiPartPostDataBoundary() |
|
58 | |||
59 | /** |
||
60 | * Gets the absolute path to the file to extract content and meta data from. |
||
61 | * |
||
62 | * @return string Absolute path to the file to extract content and meta data from. |
||
63 | */ |
||
64 | public function getFile() |
||
68 | |||
69 | /** |
||
70 | * Sets the absolute path to the file to extract content and meta data from. |
||
71 | * |
||
72 | * @param string $file Absolute path to the file to extract content and meta data from. |
||
73 | */ |
||
74 | public function setFile($file) |
||
80 | |||
81 | /** |
||
82 | * Gets the filename portion of the file. |
||
83 | * |
||
84 | * @return string The filename. |
||
85 | */ |
||
86 | public function getFileName() |
||
90 | |||
91 | /** |
||
92 | * Constructs a multi-part form-data POST body from the file's content. |
||
93 | * |
||
94 | * @param string $boundary Optional boundary to use |
||
95 | * @return string The file to extract as raw POST data. |
||
96 | * @throws \Apache_Solr_InvalidArgumentException |
||
97 | */ |
||
98 | 1 | public function getRawPostFileData($boundary = '') |
|
120 | |||
121 | /** |
||
122 | * En / Disables extraction only |
||
123 | * |
||
124 | * @param bool $extractOnly If TRUE, only extracts content from the given file without indexing |
||
125 | */ |
||
126 | 1 | public function setExtractOnly($extractOnly = true) |
|
134 | |||
135 | /** |
||
136 | * Builds an array of query parameters to use for the search query. |
||
137 | * |
||
138 | * @return array An array ready to use with query parameters |
||
139 | */ |
||
140 | 1 | public function getQueryParameters() |
|
153 | } |
||
154 |