| [ Index ] |
|
Code source de Typo3 4.1.3 |
[Code source] [Imprimer] [Statistiques]
Parent class for "Services" classes $Id: class.t3lib_svbase.php 1953 2007-01-28 20:29:09Z masi $ TODO: temp files are not removed
| Author: | René Fritz <r.fritz@colorcube.de> |
| Poids: | 717 lignes (17 kb) |
| Inclus ou requis: | 0 fois |
| Référencé: | 0 fois |
| Nécessite: | 0 fichiers |
t3lib_svbase:: (31 méthodes):
getServiceInfo()
getServiceKey()
getServiceTitle()
getServiceOption()
devLog()
errorPush()
errorPull()
getLastError()
getLastErrorMsg()
getErrorMsgArray()
getLastErrorArray()
resetErrors()
checkExec()
deactivateService()
checkInputFile()
readFile()
writeFile()
tempFile()
registerTempFile()
unlinkTempFiles()
setInput()
setInputFile()
getInput()
getInputFile()
setOutputFile()
getOutput()
getOutputFile()
init()
reset()
__destruct()
process()
Classe: t3lib_svbase - X-Ref
Parent class for "Services" classes| getServiceInfo() X-Ref |
| Returns internal information array for service return: array service description array |
| getServiceKey() X-Ref |
| Returns the service key of the service return: string service key |
| getServiceTitle() X-Ref |
| Returns the title of the service return: string service title |
| getServiceOption($optionName, $defaultValue='', $includeDefaultConfig=TRUE) X-Ref |
| Returns service configuration values from the $TYPO3_CONF_VARS['SVCONF'] array param: string Name of the config option param: boolean If set the 'default' config will be return if no special config for this service is available (default: true) param: [type] $includeDefaultConfig: ... return: mixed configuration value for the service |
| devLog($msg, $severity=0, $dataVar=FALSE) X-Ref |
| Logs debug messages to t3lib_div::devLog() param: string Debug message param: integer Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message param: array Additional data you want to pass to the logger. return: void |
| errorPush($errNum=T3_ERR_SV_GENERAL, $errMsg='Unspecified error occured') X-Ref |
| Puts an error on the error stack. Calling without parameter adds a general error. param: string error message param: string error number (see T3_ERR_SV_* constants) return: void |
| errorPull() X-Ref |
| Removes the last error from the error stack. return: void |
| getLastError() X-Ref |
| Returns the last error number from the error stack. return: string error number |
| getLastErrorMsg() X-Ref |
| Returns the last message from the error stack. return: string error message |
| getErrorMsgArray() X-Ref |
| Returns all error messages as array. return: array error messages |
| getLastErrorArray() X-Ref |
| Returns the last array from the error stack. return: array error nr and message |
| resetErrors() X-Ref |
| Reset the error stack. return: void |
| checkExec($progList) X-Ref |
| check the availability of external programs param: string comma list of programs 'perl,python,pdftotext' return: boolean return FALSE if one program was not found |
| deactivateService() X-Ref |
| Deactivate the service. Use this if the service fails at runtime and will not be available. return: void |
| checkInputFile($absFile) X-Ref |
| Check if a file exists and is readable. param: string File name with absolute path. return: string File name or FALSE. |
| readFile($absFile, $length=0) X-Ref |
| Read content from a file a file. param: string File name to read from. param: integer Maximum length to read. If empty the whole file will be read. return: string $content or FALSE |
| writeFile($content, $absFile='') X-Ref |
| Write content to a file. param: string Content to write to the file param: string File name to write into. If empty a temp file will be created. return: string File name or FALSE |
| tempFile($filePrefix) X-Ref |
| Create a temporary file. param: string File prefix. return: string File name or FALSE |
| registerTempFile($absFile) X-Ref |
| Register file which should be deleted afterwards. param: string File name with absolute path. return: void |
| unlinkTempFiles() X-Ref |
| Delete registered temporary files. param: string File name with absolute path. return: void |
| setInput($content, $type='') X-Ref |
| Set the input content for service processing. param: mixed Input content (going into ->inputContent) param: string The type of the input content (or file). Might be the same as the service subtypes. return: void |
| setInputFile($absFile, $type='') X-Ref |
| Set the input file name for service processing. param: string file name param: string The type of the input content (or file). Might be the same as the service subtypes. return: void |
| getInput() X-Ref |
| Get the input content. Will be read from input file if needed. (That is if ->inputContent is empty and ->inputFile is not) return: mixed |
| getInputFile($createFile='') X-Ref |
| Get the input file name. If the content was set by setContent a file will be created. param: string File name. If empty a temp file will be created. return: string File name or FALSE if no input or file error. |
| setOutputFile($absFile) X-Ref |
| Set the output file name. param: string file name return: void |
| getOutput() X-Ref |
| Get the output content. return: mixed |
| getOutputFile($absFile='') X-Ref |
| Get the output file name. If no output file is set, the ->out buffer is written to the file given by input parameter filename param: string Absolute filename to write to return: mixed |
| init() X-Ref |
| Initialization of the service. The class have to do a strict check if the service is available. example: check if the perl interpreter is available which is needed to run an extern perl script. return: boolean TRUE if the service is available |
| reset() X-Ref |
| Resets the service. Will be called by init(). Should be used before every use if a service instance is used multiple times. return: void |
| __destruct() X-Ref |
| Clean up the service. return: void |
| process($content='', $type='', $conf=array() X-Ref |
| Pas de description |
| Généré le : Sun Nov 25 17:13:16 2007 | par Balluche grâce à PHPXref 0.7 |
|