|
eZ Publish
[4.2]
|
Easy access to various system settings. More...
Public Member Functions | |
| attribute ($attr) | |
| attributes () | |
| eZSys () | |
| hasAttribute ($attr) | |
| removeMagicQuotes () | |
Static Public Member Functions | |
| static | addAccessPath ($path) |
| static | backupFilename () |
| static | cacheDirectory () |
| static | clearAccessPath () |
| static | createShellArgument ($argumentText, $replaceList) |
| static & | environmentVariable ($variableName, $quiet=false) |
| static | envSeparator () |
| static | escapeShellArgument ($argument) |
| static | ezcrc32 ($string) |
| static | fileSeparator () |
| static | filesystemType () |
| static | globBrace ($pattern, $flags=0) |
| static | hostname () |
| static | indexDir ($withAccessList=true) |
| static | indexFile ($withAccessList=true) |
| static | indexFileName () |
| static | init ($index="index.php", $force_VirtualHost=false) |
| static | instance () |
| Returns a shared instance of the eZSys class. | |
| static | isDebugEnabled () |
| static | isPHPVersionSufficient ($requiredVersion) |
| static | isShellExecution () |
| static | isSSLNow () |
| static | lineSeparator () |
| static | magickQuotes () |
| static | mergeArgumentElements ($argumentElements) |
| static | osName () |
| static | osType () |
| static | path ($quiet=false) |
| static | phpVersion () |
| static | phpVersionText () |
| static | protocolSchema () |
| static | requestURI () |
| static | rootDir () |
| static | serverPort () |
| static | serverProtocol () |
| static | serverURL () |
| static | serverVariable ($variableName, $quiet=false) |
| static | setEnvironmentVariable ($variableName, $variableValue) |
| static | setIsDebugEnabled ($debug) |
| static | setServerVariable ($variableName, $variableValue) |
| static | siteDir () |
| static | splitArgumentIntoElements ($argumentText) |
| static | storageDirectory () |
| static | varDirectory () |
| static | wwwDir () |
Public Attributes | |
| $AccessPath | |
| The access path of the current site view. | |
| $EnvSeparator | |
| The list separator used for env variables. | |
| $FileSeparator | |
| The directory separator used for files. | |
| $FileSystemType | |
| The type of filesystem, is either win32 or unix. This often used to determine os specific paths. | |
| $IndexFile | |
| The filepath for the index. | |
| $LineSeparator | |
| The line separator used in files. | |
| $OSType | |
| $RequestURI | |
| The uri which is used for parsing module/view information from, may differ from $_SERVER['REQUEST_URI']. | |
| $RootDir | |
| The absolute path to the root directory. | |
| $ShellEscapeCharacter | |
| The character to be used in shell escaping, this character is OS specific. | |
| $SiteDir | |
| The path to where all the code resides. | |
| $WWWDir | |
| The relative directory path of the vhless setup. | |
| const | DEBUG_INTERNALS = false |
Static Protected Member Functions | |
| static | simulateGlobBrace ($filenames) |
Easy access to various system settings.
The system is checked to see whether a virtualhost-less setup is used and sets the appropriate variables which can be fetched with siteDir(), wwwDir() and indexFile(). It also detects file and enviroment separators, fetch them with fileSeparator() and envSeparator().
Example:
// Run the init in the index file eZSys::init( eZINI::instance() ); print( eZSys::indexFile() ); print( eZSys::wwwDir() );
| static eZSys::addAccessPath | ( | $ | path | ) | [static] |
Sets the access path which is appended to the index file.
Definition at line 808 of file ezsys.php.
Referenced by eZContentCacheManager\generateObjectViewCache().
| eZSys::attribute | ( | $ | attr | ) |
| eZSys::attributes | ( | ) |
Definition at line 754 of file ezsys.php.
Referenced by hasAttribute().
| static eZSys::backupFilename | ( | ) | [static] |
Definition at line 405 of file ezsys.php.
Referenced by eZCodeTemplate\apply(), and eZINI\save().
| static eZSys::cacheDirectory | ( | ) | [static] |
Definition at line 456 of file ezsys.php.
Referenced by eZContentClassAttribute\cachedInfo(), eZTemplateTreeCache\cacheDirectory(), eZSSLZone\cacheFileName(), eZURLWildcard\cacheInfo(), eZContentCache\cachePathInfo(), eZPDFTable\callImage(), checkPaths(), eZContentClassAttribute\classAttributeIdentifiersHash(), eZContentClass\classIdentifiersHash(), eZContentCache\cleanup(), eZCache\clearClassID(), eZCache\clearItem(), eZCache\clearSortKey(), eZCache\clearStateLimitations(), eZCache\clearTemplateOverrideCache(), eZTemplateCompiler\compilationDirectory(), eZTemplateDesignResource\createOverrideCache(), eZContentLanguage\expireCache(), eZTemplateCacheFunction\expiryTemplateBlockCacheDir(), eZExpiryHandler\eZExpiryHandler(), eZImageManager\eZImageManager(), eZMutex\eZMutex(), eZContentLanguage\fetchList(), eZNodeviewfunctions\generateViewCacheFile(), eZSSLZone\getSSLZones(), eZScript\initialize(), eZContentObjectStateGroup\limitations(), eZTranslationCache\rootCacheDirectory(), eZExpiryHandler\store(), eZPackageType\storeObjectAttribute(), eZTemplateCacheBlock\templateBlockCacheDir(), eZPackage\temporaryExportPath(), and eZPackage\temporaryImportPath().
| static eZSys::clearAccessPath | ( | ) | [static] |
Empties the access path.
Definition at line 820 of file ezsys.php.
Referenced by eZContentCacheManager\generateObjectViewCache().
| static eZSys::createShellArgument | ( | $ | argumentText, |
| $ | replaceList | ||
| ) | [static] |
Replaces % elements in the argument text $argumentText using the replace list $replaceList. It will also properly escape the argument.
Definition at line 271 of file ezsys.php.
Referenced by eZImageShellHandler\convert(), and eZImageHandler\convertFilterToText().
| static& eZSys::environmentVariable | ( | $ | variableName, |
| $ | quiet = false |
||
| ) | [static] |
| static eZSys::envSeparator | ( | ) | [static] |
| static eZSys::escapeShellArgument | ( | $ | argument | ) | [static] |
Escape a string to be used as a shell argument and return it.
Definition at line 249 of file ezsys.php.
Referenced by eZImageShellHandler\convert().
| static eZSys::ezcrc32 | ( | $ | string | ) | [static] |
A wrapper for php's crc32 function.
Definition at line 1058 of file ezsys.php.
Referenced by eZWebDAVContentBackendAuth\authorize(), eZTemplateCacheBlock\cachePath(), eZUser\canLoginToSiteAccess(), eZImageManager\createImageAliasKey(), eZSiteInstaller\createSiteAccess(), eZTemplateDigestOperator\modify(), eZSiteAccess\siteAccessList(), eZCharTransform\transform(), eZCharTransform\transformByGroup(), and eZWebDAVContentServer\userHasSiteAccess().
| eZSys::eZSys | ( | ) |
Initializes the object with settings taken from the current script run.
Definition at line 60 of file ezsys.php.
Referenced by instance().
| static eZSys::fileSeparator | ( | ) | [static] |
Returns the string which is used for file separators on the current OS (server).
Definition at line 172 of file ezsys.php.
Referenced by eZImageShellHandler\convert(), eZDir\isWriteable(), and eZDir\separator().
| static eZSys::filesystemType | ( | ) | [static] |
| static eZSys::globBrace | ( | $ | pattern, |
| $ | flags = 0 |
||
| ) | [static] |
Wraps around the built-in glob() function to provide same functionality for systems (e.g Solaris) that does not support GLOB_BRACE.
Definition at line 1090 of file ezsys.php.
Referenced by eZFS2FileHandler\fileDeleteByDirList(), eZFSFileHandler\fileDeleteByDirList(), and eZFSFileHandler\fileDeleteByWildcard().
| eZSys::hasAttribute | ( | $ | attr | ) |
| static eZSys::hostname | ( | ) | [static] |
Returns the current hostname.
Definition at line 584 of file ezsys.php.
Referenced by eZHTTPTool\createRedirectUrl(), eZSiteInstaller\createSiteaccessUrls(), extension_path(), eZRSSExport\fetchImageURL(), serverPort(), and serverURL().
| static eZSys::indexDir | ( | $ | withAccessList = true | ) | [static] |
The filepath for the index file.
Definition at line 517 of file ezsys.php.
Referenced by attribute(), eZWebDAVContentServer\currentSiteFromPath(), eZWebDAVContentBackend\currentSiteFromPath(), eZWebDAVContentServer\processURL(), and eZSSLZone\switchIfNeeded().
| static eZSys::indexFile | ( | $ | withAccessList = true | ) | [static] |
The filepath for the index file with the access path appended.
Definition at line 528 of file ezsys.php.
Referenced by attribute(), eZTemplateCompiler\compilationFilename(), eZNodeviewfunctions\generateViewCacheFile(), eZUser\instance(), and ezpLanguageSwitcher\process().
| static eZSys::indexFileName | ( | ) | [static] |
The filepath for the index file.
Definition at line 575 of file ezsys.php.
Referenced by eZSiteInstaller\createSiteaccessUrls().
| static eZSys::init | ( | $ | index = "index.php", |
| $ | force_VirtualHost = false |
||
| ) | [static] |
| static eZSys::instance | ( | ) | [static] |
Returns a shared instance of the eZSys class.
Definition at line 1045 of file ezsys.php.
Referenced by addAccessPath(), backupFilename(), cacheDirectory(), clearAccessPath(), createShellArgument(), eZMediaType\deleteStoredObjectAttribute(), eZBinaryFileType\deleteStoredObjectAttribute(), envSeparator(), escapeShellArgument(), ezcrc32(), eZURLOperator\eZDesign(), eZURLOperator\eZImage(), eZURLOperator\eZURLOperator(), eZWebDAVContentServer\fetchContentList(), eZWebDAVContentServer\fetchNodeInfo(), eZWebDAVContentServer\fetchSiteListContent(), eZWebDAVContentServer\fetchVirtualSiteContent(), eZPDFExport\filepath(), fileSeparator(), filesystemType(), indexDir(), indexFile(), indexFileName(), init(), isSSLNow(), lineSeparator(), eZMail\lineSeparator(), mergeArgumentElements(), osName(), osType(), eZPDFExport\remove(), requestURI(), rootDir(), eZSysInfo\scan(), eZSendmailTransport\sendMail(), serverURL(), siteDir(), eZHTTPFile\storageDir(), storageDirectory(), eZMediaType\trashStoredObjectAttribute(), eZBinaryFileType\trashStoredObjectAttribute(), varDirectory(), and wwwDir().
| static eZSys::isDebugEnabled | ( | ) | [static] |
Definition at line 831 of file ezsys.php.
Referenced by init().
| static eZSys::isPHPVersionSufficient | ( | $ | requiredVersion | ) | [static] |
true if the PHP version is equal or higher than $requiredVersion. | $requiredVersion | must be an array with version number. |
eZSys::isPHPVersionSufficient( array( 4, 1, 0 ) );
| static eZSys::isShellExecution | ( | ) | [static] |
Determins if the script got executed over the web or the shell/commandoline.
Definition at line 226 of file ezsys.php.
Referenced by eZDebug\isAllowedByCurrentIP(), and eZDBInterface\reportError().
| static eZSys::isSSLNow | ( | ) | [static] |
Determines if SSL is enabled and protocol HTTPS is used.
Definition at line 601 of file ezsys.php.
Referenced by serverProtocol(), serverURL(), and eZSSLZone\switchIfNeeded().
| static eZSys::lineSeparator | ( | ) | [static] |
Returns the string which is used for line separators on the current OS (server).
Definition at line 414 of file ezsys.php.
Referenced by eZINI\save().
| static eZSys::magickQuotes | ( | ) | [static] |
| static eZSys::mergeArgumentElements | ( | $ | argumentElements | ) | [static] |
Merges an argument list created by splitArgumentIntoElements() back into a text string. The argument text will be properly quoted.
| static eZSys::osName | ( | ) | [static] |
| static eZSys::osType | ( | ) | [static] |
"win32", "unix" or "mac" Definition at line 140 of file ezsys.php.
Referenced by eZTARArchiveHandler\_extractList(), eZTARArchiveHandler\_translateWinPath(), changeDBCharsetORACLE(), checkDBExtraConditionsORACLE(), eZImageShellHandler\convert(), eZGZIPZLIBCompressionHandler\isAvailable(), eZFile\isWriteable(), eZDir\isWriteable(), and eZFileHandler\linkCopy().
| static eZSys::path | ( | $ | quiet = false | ) | [static] |
Definition at line 720 of file ezsys.php.
Referenced by cacheDirectory(), storageDirectory(), and varDirectory().
| static eZSys::phpVersion | ( | ) | [static] |
Definition at line 191 of file ezsys.php.
Referenced by isPHPVersionSufficient().
| static eZSys::phpVersionText | ( | ) | [static] |
Definition at line 182 of file ezsys.php.
Referenced by phpVersion().
| static eZSys::protocolSchema | ( | ) | [static] |
| static eZSys::requestURI | ( | ) | [static] |
Definition at line 1035 of file ezsys.php.
Referenced by init(), eZURI\instance(), eZUser\instance(), and eZSSLZone\switchIfNeeded().
| static eZSys::rootDir | ( | ) | [static] |
The absolute path to the root directory.
Definition at line 475 of file ezsys.php.
Referenced by checkPaths(), and eZDir\recursiveDelete().
| static eZSys::serverPort | ( | ) | [static] |
Definition at line 662 of file ezsys.php.
Referenced by eZHTTPTool\createRedirectUrl(), and isSSLNow().
| static eZSys::serverProtocol | ( | ) | [static] |
Definition at line 622 of file ezsys.php.
Referenced by extension_path().
| static eZSys::serverURL | ( | ) | [static] |
| static eZSys::serverVariable | ( | $ | variableName, |
| $ | quiet = false |
||
| ) | [static] |
$_SERVER variable. If the variable is not present an error is shown and null is returned. Definition at line 693 of file ezsys.php.
Referenced by eZHTTPTool\createRedirectUrl(), hostname(), eZWeb\init(), init(), eZDebug\isAllowedByCurrentIP(), isShellExecution(), eZUser\isUserIPInList(), path(), protocolSchema(), eZDBInterface\reportError(), serverPort(), eZSiteAccess\siteAccessList(), eZSSLZone\switchIfNeeded(), eZDebug\write(), eZAudit\writeAudit(), and eZDebug\writeFile().
| static eZSys::setEnvironmentVariable | ( | $ | variableName, |
| $ | variableValue | ||
| ) | [static] |
| static eZSys::setIsDebugEnabled | ( | $ | debug | ) | [static] |
| static eZSys::setServerVariable | ( | $ | variableName, |
| $ | variableValue | ||
| ) | [static] |
| static eZSys::simulateGlobBrace | ( | $ | filenames | ) | [static, protected] |
Expands a list of filenames like GLOB_BRACE does.
GLOB_BRACE is non POSIX and only available in GNU glibc. This is needed to support operating systems like Solars.
Definition at line 1122 of file ezsys.php.
Referenced by globBrace().
| static eZSys::siteDir | ( | ) | [static] |
The path to where all the code resides.
Definition at line 499 of file ezsys.php.
Referenced by attribute().
| static eZSys::splitArgumentIntoElements | ( | $ | argumentText | ) | [static] |
Splits the argument text into argument array elements. It will split text on spaces and set them as strings in the array, spaces will be counted and inserted as integers with the space count. Text placed in quotes will also be parsed, this allows for spaces in the text.
$list = splitArgumentIntoElements( "-geometry 100x100" ); var_dump( $list ); // will give: array( "-geometry", 1, "100x100" );
You can then easily modify the elements separately and create the argument text with mergeArgumentElements().
| static eZSys::storageDirectory | ( | ) | [static] |
\ return the directory used for storing various kinds of files like images, audio and more. This will include the varDirectory().
Definition at line 443 of file ezsys.php.
Referenced by eZStylePackageCreator\commitCSSFile(), filePathForBinaryFile(), eZImageAliasHandler\imagePath(), eZImageAliasHandler\imagePathByNode(), eZBinaryFileType\insertRegularFile(), eZMediaType\insertRegularFile(), eZHTTPFile\store(), eZBinaryFile\storedFileInfo(), eZMedia\storedFileInfo(), eZBinaryFileHandler\storedFilename(), eZBinaryFileType\unserializeContentObjectAttribute(), eZMediaType\unserializeContentObjectAttribute(), eZStylePackageCreator\validateImageFiles(), and eZPackageCreationHandler\validatePackageThumbnail().
| static eZSys::varDirectory | ( | ) | [static] |
Definition at line 432 of file ezsys.php.
Referenced by eZWebDAVServer\appendLogEntry(), eZWebDAVContentBackend\appendLogEntry(), cacheDirectory(), eZDebug\printReport(), eZWebDAVServer\rootDirectory(), storageDirectory(), eZWebDAVServer\tempDirectory(), eZWebDAVContentBackend\tempDirectory(), and eZWebDAVContentServer\virtualInfoFileName().
| static eZSys::wwwDir | ( | ) | [static] |
The relative directory path of the vhless setup.
Definition at line 508 of file ezsys.php.
Referenced by attribute(), eZSiteInstaller\createSiteaccessUrls(), extension_path(), eZTemplateImageOperator\eZTemplateImageOperator(), eZRSSExport\fetchImageURL(), eZTemplatesStatisticsReporter\generateStatistics(), eZUser\instance(), and eZWordToImageOperator\modify().
| eZSys::$AccessPath |
| eZSys::$EnvSeparator |
| eZSys::$FileSeparator |
| eZSys::$FileSystemType |
| eZSys::$RequestURI |
| eZSys::$ShellEscapeCharacter |
| eZSys::$WWWDir |
| const eZSys::DEBUG_INTERNALS = false |
Definition at line 55 of file ezsys.php.
Referenced by isDebugEnabled().