|
TYPO3 API
SVNRelease
|

Public Member Functions | |
| getServiceInfo () | |
| getServiceKey () | |
| getServiceTitle () | |
| getServiceOption ($optionName, $defaultValue= '', $includeDefaultConfig=TRUE) | |
| devLog ($msg, $severity=0, $dataVar=FALSE) | |
| errorPush ($errNum=T3_ERR_SV_GENERAL, $errMsg= 'Unspecified error occured') | |
| errorPull () | |
| getLastError () | |
| getLastErrorMsg () | |
| getErrorMsgArray () | |
| getLastErrorArray () | |
| resetErrors () | |
| checkExec ($progList) | |
| deactivateService () | |
| checkInputFile ($absFile) | |
| readFile ($absFile, $length=0) | |
| writeFile ($content, $absFile= '') | |
| tempFile ($filePrefix) | |
| registerTempFile ($absFile) | |
| unlinkTempFiles () | |
| setInput ($content, $type= '') | |
| setInputFile ($absFile, $type= '') | |
| getInput () | |
| getInputFile ($createFile= '') | |
| setOutputFile ($absFile) | |
| getOutput () | |
| getOutputFile ($absFile= '') | |
| init () | |
| reset () | |
| __destruct () | |
Public Attributes | |
| $info = array() | |
| $error = array() | |
| $writeDevLog = FALSE | |
| $out = '' | |
| $inputFile = '' | |
| $inputContent = '' | |
| $inputType = '' | |
| $outputFile = '' | |
Protected Attributes | |
| $prefixId = '' | |
Private Attributes | |
| $tempFiles = array() | |
Definition at line 115 of file class.t3lib_svbase.php.
| t3lib_svbase::__destruct | ( | ) |
Clean up the service. Child classes should explicitly call parent::__destruct() in their destructors for this to work
Definition at line 667 of file class.t3lib_svbase.php.
References unlinkTempFiles().
| t3lib_svbase::checkExec | ( | $ | progList | ) |
check the availability of external programs
| string | comma list of programs 'perl,python,pdftotext' |
Definition at line 361 of file class.t3lib_svbase.php.
References t3lib_exec\checkCommand(), errorPush(), and t3lib_div\trimExplode().
Referenced by init().
| t3lib_svbase::checkInputFile | ( | $ | absFile | ) |
Check if a file exists and is readable.
| string | File name with absolute path. |
Definition at line 399 of file class.t3lib_svbase.php.
References errorPush(), and t3lib_div\isAllowedAbsPath().
Referenced by getInputFile(), and readFile().
| t3lib_svbase::deactivateService | ( | ) |
Deactivate the service. Use this if the service fails at runtime and will not be available.
Definition at line 381 of file class.t3lib_svbase.php.
| t3lib_svbase::devLog | ( | $ | msg, |
| $ | severity = 0, |
||
| $ | dataVar = FALSE |
||
| ) |
Logs debug messages to t3lib_div::devLog()
| string | Debug message |
| integer | Severity: 0 is info, 1 is notice, 2 is warning, 3 is fatal error, -1 is "OK" message |
| array|bool | Additional data you want to pass to the logger. |
Definition at line 246 of file class.t3lib_svbase.php.
Referenced by tx_sv_auth\authUser(), tx_sv_auth\getGroups(), tx_sv_auth\getUser(), tx_saltedpasswords_sv1\updatePassword(), tx_saltedpasswords_sv1\writeLog(), and tx_openid_sv1\writeLog().
| t3lib_svbase::errorPull | ( | ) |
Removes the last error from the error stack.
Definition at line 275 of file class.t3lib_svbase.php.
| t3lib_svbase::errorPush | ( | $ | errNum = T3_ERR_SV_GENERAL, |
| $ | errMsg = 'Unspecified error occured' |
||
| ) |
Puts an error on the error stack. Calling without parameter adds a general error.
| integer | error number (see T3_ERR_SV_* constants) |
| string | error message |
Definition at line 260 of file class.t3lib_svbase.php.
References $GLOBALS.
Referenced by checkExec(), checkInputFile(), readFile(), tempFile(), and writeFile().
| t3lib_svbase::getErrorMsgArray | ( | ) |
Returns all error messages as array.
Definition at line 317 of file class.t3lib_svbase.php.
References $error.
| t3lib_svbase::getInput | ( | ) |
Get the input content. Will be read from input file if needed. (That is if ->inputContent is empty and ->inputFile is not)
Definition at line 542 of file class.t3lib_svbase.php.
References readFile().
| t3lib_svbase::getInputFile | ( | $ | createFile = '' | ) |
Get the input file name. If the content was set by setContent a file will be created.
| string | File name. If empty a temp file will be created. |
Definition at line 557 of file class.t3lib_svbase.php.
References checkInputFile(), and writeFile().
| t3lib_svbase::getLastError | ( | ) |
Returns the last error number from the error stack.
Definition at line 287 of file class.t3lib_svbase.php.
References $error.
Referenced by init().
| t3lib_svbase::getLastErrorArray | ( | ) |
Returns the last array from the error stack.
Definition at line 334 of file class.t3lib_svbase.php.
| t3lib_svbase::getLastErrorMsg | ( | ) |
Returns the last message from the error stack.
Definition at line 302 of file class.t3lib_svbase.php.
References $error.
| t3lib_svbase::getOutput | ( | ) |
Get the output content.
Definition at line 590 of file class.t3lib_svbase.php.
References readFile().
| t3lib_svbase::getOutputFile | ( | $ | absFile = '' | ) |
Get the output file name. If no output file is set, the ->out buffer is written to the file given by input parameter filename
| string | Absolute filename to write to |
Definition at line 604 of file class.t3lib_svbase.php.
References writeFile().
| t3lib_svbase::getServiceInfo | ( | ) |
Returns internal information array for service
Definition at line 181 of file class.t3lib_svbase.php.
| t3lib_svbase::getServiceKey | ( | ) |
Returns the service key of the service
Definition at line 191 of file class.t3lib_svbase.php.
| t3lib_svbase::getServiceOption | ( | $ | optionName, |
| $ | defaultValue = '', |
||
| $ | includeDefaultConfig = TRUE |
||
| ) |
Returns service configuration values from the $TYPO3_CONF_VARS['SVCONF'] array
| string | Name of the config option |
| mixed | Default configuration if no special config is available |
| bool | If set the 'default' config will be returned if no special config for this service is available (default: true) |
Definition at line 214 of file class.t3lib_svbase.php.
References $GLOBALS.
Referenced by tx_sv_authbase\initAuth().
| t3lib_svbase::getServiceTitle | ( | ) |
Returns the title of the service
Definition at line 201 of file class.t3lib_svbase.php.
| t3lib_svbase::init | ( | ) |
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.
Reimplemented in tx_rsaauth_sv1, tx_openid_sv1, and tx_saltedpasswords_sv1.
Definition at line 626 of file class.t3lib_svbase.php.
References checkExec(), getLastError(), and reset().
| t3lib_svbase::readFile | ( | $ | absFile, |
| $ | length = 0 |
||
| ) |
Read content from a file a file.
| string | File name to read from. |
| integer | Maximum length to read. If empty the whole file will be read. |
Definition at line 421 of file class.t3lib_svbase.php.
References $out, checkInputFile(), and errorPush().
Referenced by getInput(), and getOutput().
| t3lib_svbase::registerTempFile | ( | $ | absFile | ) |
Register file which should be deleted afterwards.
| string | File name with absolute path. |
Definition at line 483 of file class.t3lib_svbase.php.
Referenced by tempFile().
| t3lib_svbase::reset | ( | ) |
Resets the service. Will be called by init(). Should be used before every use if a service instance is used multiple times.
Definition at line 651 of file class.t3lib_svbase.php.
References resetErrors(), and unlinkTempFiles().
Referenced by init().
| t3lib_svbase::resetErrors | ( | ) |
Reset the error stack.
Definition at line 343 of file class.t3lib_svbase.php.
Referenced by reset().
| t3lib_svbase::setInput | ( | $ | content, |
| $ | type = '' |
||
| ) |
Set the input content for service processing.
| mixed | Input content (going into ->inputContent) |
| string | The type of the input content (or file). Might be the same as the service subtypes. |
Definition at line 515 of file class.t3lib_svbase.php.
References $content.
| t3lib_svbase::setInputFile | ( | $ | absFile, |
| $ | type = '' |
||
| ) |
Set the input file name for service processing.
| string | file name |
| string | The type of the input content (or file). Might be the same as the service subtypes. |
Definition at line 529 of file class.t3lib_svbase.php.
| t3lib_svbase::setOutputFile | ( | $ | absFile | ) |
Set the output file name.
| string | file name |
Definition at line 580 of file class.t3lib_svbase.php.
| t3lib_svbase::tempFile | ( | $ | filePrefix | ) |
Create a temporary file.
| string | File prefix. |
Definition at line 465 of file class.t3lib_svbase.php.
References errorPush(), registerTempFile(), and t3lib_div\tempnam().
Referenced by writeFile().
| t3lib_svbase::unlinkTempFiles | ( | ) |
Delete registered temporary files.
| string | File name with absolute path. |
Definition at line 493 of file class.t3lib_svbase.php.
References t3lib_div\unlink_tempfile().
Referenced by __destruct(), and reset().
| t3lib_svbase::writeFile | ( | $ | content, |
| $ | absFile = '' |
||
| ) |
Write content to a file.
| string | Content to write to the file |
| string | File name to write into. If empty a temp file will be created. |
Definition at line 441 of file class.t3lib_svbase.php.
References $content, errorPush(), t3lib_div\isAllowedAbsPath(), and tempFile().
Referenced by getInputFile(), and getOutputFile().
| t3lib_svbase::$error = array() |
Definition at line 125 of file class.t3lib_svbase.php.
Referenced by getErrorMsgArray(), getLastError(), getLastErrorMsg(), and tx_sv_authbase\writelog().
| t3lib_svbase::$info = array() |
Definition at line 120 of file class.t3lib_svbase.php.
| t3lib_svbase::$inputContent = '' |
Definition at line 146 of file class.t3lib_svbase.php.
| t3lib_svbase::$inputFile = '' |
Definition at line 141 of file class.t3lib_svbase.php.
| t3lib_svbase::$inputType = '' |
Definition at line 151 of file class.t3lib_svbase.php.
| t3lib_svbase::$out = '' |
Definition at line 136 of file class.t3lib_svbase.php.
Referenced by readFile().
| t3lib_svbase::$outputFile = '' |
Definition at line 156 of file class.t3lib_svbase.php.
t3lib_svbase::$prefixId = '' [protected] |
Reimplemented in tx_rsaauth_sv1, tx_openid_sv1, and tx_saltedpasswords_sv1.
Definition at line 167 of file class.t3lib_svbase.php.
t3lib_svbase::$tempFiles = array() [private] |
Temporary files which have to be deleted
Definition at line 164 of file class.t3lib_svbase.php.
| t3lib_svbase::$writeDevLog = FALSE |
Reimplemented in tx_sv_authbase.
Definition at line 130 of file class.t3lib_svbase.php.
1.7.5.1