Метод |
Описание |
|
__construct ( $settings = [] ) |
*!
Constructor |
|
currentOptionConfig ( ) |
*!
\return the current option configuration, this will be a mix of the standard options and script specified. |
|
currentOptions ( ) |
*!
\return the currently set options if getOptions() has been run or \c false if no options are set. |
|
exitCode ( ) |
|
|
getOptions ( $config = '', $argumentConfig = '', $optionHelp = false, $arguments = false, $useStandardOptions = true ) |
*!
Parse command line into options array. If stanadrd options are in use, carry
out the associated task (eg. switch siteaccess ir logged-in user)
param $config see ezcli::parseOptionString
param $argumentConfig see ezcli::getOptions (unused for now)
param $optionHelp string echoed to screen when script invoked with -h/--help
param $arguments array of arguments. If false, command line is parsed automatically
param $useStandardOptions true or an array of standard options to be used. |
|
initializationError ( ) |
|
|
initialize ( ) |
*!
Initializes all settings which are required for the script to run,
must be called after startup() and getOptions(). |
|
instance ( array $settings = [] ) : eZScript |
Returns a shared instance of the eZScript class. |
|
isInitialized ( ) |
|
|
isLoud ( ) |
*!
\return \c true if output is allowed. |
|
isQuiet ( ) |
*!
\return \c true if output is not allowed. |
|
iterate ( $cli, $status, $text = false ) |
|
|
resetIteration ( $iterationMax = false, $startIndex ) |
|
|
setAllowedDebugLevels ( $allowedDebugLevels ) |
*!
Sets which debug levels are to be shown on debug output, this must be an array
with EZ_LEVEL_* definitions taken from eZDebug. |
|
setDebugMessage ( $message ) |
*!
Sets the text message which is shown before the debug list. |
|
setExitCode ( $code = false ) |
*!
Sets the current exit code which will be set with an exit() call in shutdown(). |
|
setIsInitialized ( $isInitialized ) |
|
|
setIsQuiet ( $isQuiet ) |
*!
Sets whether any output should be used or not. |
|
setIterationData ( $trueString, $falseString, $numericStrings = false, $wrapNumeric = false ) |
|
|
setShowVerboseOutput ( $verbose ) |
*!
Controls whether verbose output is used or not, use \c false to turn it off,
\c true to turn it on or a number to select the verbose level (\c true == 1). |
|
setUseDebugAccumulators ( $useAccumulators ) |
*!
Sets whether accumulators should be shown on debug output or not. |
|
setUseDebugOutput ( $useDebug ) |
*!
Sets whether debug output should be enabled or not. |
|
setUseDebugTimingPoints ( $useTimingPoints ) |
*!
Sets whether timing points should be shown on debug output or not. |
|
setUseExtensions ( $useExtensions ) |
*!
Sets whether extension support is to be added or not. |
|
setUseIncludeFiles ( $useIncludeFiles ) |
*!
Sets whether include files should be shown on debug output or not. |
|
setUseModules ( $useModules ) |
|
|
setUseSession ( $useSession ) |
*!
Sets whether session is to be used or not. |
|
setUseSiteAccess ( $siteAccess ) |
*!
Sets the current site access to \a $siteAccess. |
|
setUser ( $userLogin, $userPassword ) |
|
|
showHelp ( $useStandardOptions = false, $optionConfig = false, $optionHelp = false, $argumentConfig = false, $arguments = false ) |
|
|
shutdown ( $exitCode = false, $exitText = false ) |
*!
Shuts down the currently running script, the following things will be done:
- Remove current session (if sessions are used)
- Print debug messages (if debug is enabled)
- Call cleanup function using eZExecution
- Sets the clean exit flag, that way an exit, die or other stops will not issue an error |
|
startup ( ) |
*!
Checks if the script is run in CLI mode, if not it exits with a warning. |
|
updateDebugSettings ( $useDebug = null ) |
*!
\static
Reads settings from site.ini and passes them to eZDebug. |
|
updateTextCodecSettings ( ) |
*!
\static
Reads settings from i18n.ini and passes them to eZTextCodec. |
|
usedSiteAccess ( ) |
*!
\return the currently set siteaccess or \c false if none is set. |
|
validateVersion ( ) |
*!
Checks if the script is run on correct eZ Publish version. |
|
verboseOutputLevel ( ) |
*!
\return the verbosity level for the script, will be \c false or a number in the range 1 and up. |
|