![]() |
TYPO3
7.6
|
Public Member Functions | |
__construct () | |
initParser ($extension) | |
softInit ($extension) | |
searchTypeMediaTitle ($extension) | |
isMultiplePageExtension ($extension) | |
readFileContent ($ext, $absFile, $cPKey) | |
fileContentParts ($ext, $absFile) | |
splitPdfInfo ($pdfInfoArray) | |
removeEndJunk ($string) | |
getIcon ($extension) | |
Public Attributes | |
$pdf_mode = -20 | |
$app = array() | |
$ext2itemtype_map = array() | |
$supportedExtensions = array() | |
$pObj | |
Protected Member Functions | |
sL ($reference, $useHtmlSpecialChar=false) | |
setLocaleForServerFileSystem ($resetLocale=false) | |
Protected Attributes | |
$langObject | |
External standard parsers for indexed_search MUST RETURN utf-8 content!
Definition at line 25 of file FileContentParser.php.
__construct | ( | ) |
Constructs this external parsers object
Definition at line 64 of file FileContentParser.php.
References $GLOBALS.
fileContentParts | ( | $ext, | |
$absFile | |||
) |
Creates an array with pointers to divisions of document.
ONLY for PDF files at this point. All other types will have an array with a single element with the value "0" (zero) coming back.
string | $ext | File extension |
string | $absFile | Absolute filename (must exist and be validated OK before calling function) |
Definition at line 746 of file FileContentParser.php.
References CommandUtility\exec(), MathUtility\forceIntegerInRange(), FileContentParser\setLocaleForServerFileSystem(), and FileContentParser\splitPdfInfo().
getIcon | ( | $extension | ) |
Return icon for file extension
string | $extension | File extension, lowercase. |
Definition at line 823 of file FileContentParser.php.
References elseif.
initParser | ( | $extension | ) |
Initialize external parser for parsing content.
string | $extension | File extension |
Definition at line 76 of file FileContentParser.php.
References $GLOBALS, MathUtility\forceIntegerInRange(), FileContentParser\sL(), and GeneralUtility\trimExplode().
isMultiplePageExtension | ( | $extension | ) |
Returns TRUE if the input extension (item_type) is a potentially a multi-page extension
string | $extension | Extension / item_type string |
Definition at line 423 of file FileContentParser.php.
readFileContent | ( | $ext, | |
$absFile, | |||
$cPKey | |||
) |
Reads the content of an external file being indexed.
string | $ext | File extension, eg. "pdf", "doc" etc. |
string | $absFile | Absolute filename of file (must exist and be validated OK before calling function) |
string | $cPKey | Pointer to section (zero for all other than PDF which will have an indication of pages into which the document should be split.) |
Definition at line 459 of file FileContentParser.php.
References CommandUtility\exec(), GeneralUtility\getUrl(), FileContentParser\removeEndJunk(), FileContentParser\setLocaleForServerFileSystem(), FileContentParser\sL(), FileContentParser\splitPdfInfo(), GeneralUtility\tempnam(), and GeneralUtility\xml2tree().
removeEndJunk | ( | $string | ) |
Removes some strange char(12) characters and line breaks that then to occur in the end of the string from external files.
string | $string | String to clean up |
Definition at line 807 of file FileContentParser.php.
Referenced by FileContentParser\readFileContent().
searchTypeMediaTitle | ( | $extension | ) |
Return title of entry in media type selector box.
string | $extension | File extension |
Definition at line 288 of file FileContentParser.php.
References $GLOBALS, FileContentParser\sL(), and GeneralUtility\trimExplode().
|
protected |
Sets the locale for LC_CTYPE to $TYPO3_CONF_VARS['SYS']['systemLocale'] if $TYPO3_CONF_VARS['SYS']['UTF8filesystem'] is set.
Parameter $resetLocale
has to be FALSE and TRUE alternating for all calls.
string $lastLocale Stores the locale used before it is overridden by this method.
bool | $resetLocale | TRUE resets the locale to $lastLocale. |
\RuntimeException |
Definition at line 714 of file FileContentParser.php.
References $GLOBALS.
Referenced by FileContentParser\fileContentParts(), and FileContentParser\readFileContent().
|
protected |
Wraps the "splitLabel function" of the language object.
string | $reference,: | Reference/key of the label |
bool | $useHtmlSpecialChar,: | Convert special chars to HTML entities (default: FALSE) |
Definition at line 441 of file FileContentParser.php.
Referenced by FileContentParser\initParser(), FileContentParser\readFileContent(), and FileContentParser\searchTypeMediaTitle().
softInit | ( | $extension | ) |
Initialize external parser for backend modules Doesn't evaluate if parser is configured right - more like returning POSSIBLE supported extensions (for showing icons etc) in backend and frontend plugin
string | $extension | File extension to initialize for. |
Definition at line 245 of file FileContentParser.php.
splitPdfInfo | ( | $pdfInfoArray | ) |
Analysing PDF info into a useable format.
array | $pdfInfoArray | Array of PDF content, coming from the pdfinfo tool |
Definition at line 787 of file FileContentParser.php.
Referenced by FileContentParser\fileContentParts(), and FileContentParser\readFileContent().
$app = array() |
Definition at line 39 of file FileContentParser.php.
$ext2itemtype_map = array() |
Definition at line 44 of file FileContentParser.php.
|
protected |
Definition at line 59 of file FileContentParser.php.
$pdf_mode = -20 |
Definition at line 34 of file FileContentParser.php.
$pObj |
Definition at line 54 of file FileContentParser.php.
$supportedExtensions = array() |
Definition at line 49 of file FileContentParser.php.