lib/ezutils/classes/ezsys.php
\eZSys
Properties


array
$AccessPath= ''
The access path of the current site view, associated array of associated arrays.
On first level key is 'siteaccess' and 'path' to distinguish between siteaccess and general path. On second level you have (string)'name' and (array)'url', where url is the path and name is the name of the source (used to match siteaccess in {@link eZSys::indexFile()} for RemoveSiteAccessIfDefaultAccess matching) .
- Type
- array


string
$FileSystemType= ''
The type of filesystem, is either win32 or unix. This often used to determine OS specific paths.
- Type
- string


string
$LineSeparator= ''
The line separator used in files, "\n" / "\n\r" / "\r"
- Type
- string


array
$Params= 'null'
Holds server variables as read automatically or provided by unit tests Only used by init functionality as other calls will need to use live data direclty from globals.
null
Details- Type
- array


string
$RequestURI= ''
The uri which is used for parsing module/view information from, may differ from $_SERVER['REQUEST_URI']
- Type
- string


\stringt
$ShellEscapeCharacter= ''
The character to be used in shell escaping, this character is OS specific
- Type
- \stringt


null|\eZSys
$instance= 'null'
Holds eZSys instance
null
Details- Type
- null | \eZSys
Methods


__construct(
array | null $serverParams
=
null
)
:
void
Initializes the object with settings taken from the current script run.
Name | Type | Description |
---|---|---|
$serverParams | array | null | For unit testing use, see first few lines for content |


__get(
$propertyName
)
:
mixed
Magic function to get access readonly properties (protected)
Name | Type | Description |
---|---|---|
$propertyName |
Type | Description |
---|---|
mixed |
Exception | Description |
---|---|
\ezcBasePropertyNotFoundException |


addAccessPath(
array | string $path, string $name
=
'undefined', bool $siteaccess
=
true
)
:
void
Appends the access path (parts of url that identifies siteaccess), used by {@link eZSys::indexFile()} NOTE: Does not make sense to use for siteaccess, as you would want to clear current path and set new one normally, so preferably use {@link eZSys::setAccessPath()} in this case.
Name | Type | Description |
---|---|---|
$path | array | string | |
$name | string | An identifer of the name of the path provided {@link $AccessPath} |
$siteaccess | bool | Hints if path is siteaccess related or not, needed in case subsequesnt code suddenly changes siteaccess and needs to clear siteaccess scope |


clearAccessPath(
$siteaccess
=
true
)
:
void
Clears the access path, used by {@link eZSys::indexFile()}
Name | Type | Description |
---|---|---|
$siteaccess |


createShellArgument(
$argumentText, $replaceList
)
:
void
Name | Type | Description |
---|---|---|
$argumentText | ||
$replaceList |


environmentVariable(
$variableName, $quiet
=
false
)
:
void
Return the variable named \a $variableName in the global \c ENV variable.
If the variable is not present an error is shown and \c null is returned.
Name | Type | Description |
---|---|---|
$variableName | ||
$quiet |


getValidwwwDir(
string $phpSelf, string $scriptFileName, string $index
)
:
string | null | false
Generate wwwdir from phpSelf if valid accoring to scriptFileName and return null if invalid and false if there is no index in phpSelf
Name | Type | Description |
---|---|---|
$phpSelf | string | |
$scriptFileName | string | |
$index | string |
Type | Description |
---|---|
string | null | false | String in form 'path/path2' if valid, null if not and false if $index is not part of phpself |


hasEnvironmentVariable(
$variableName
)
:
void
Name | Type | Description |
---|---|---|
$variableName |


init(
string $index
=
'index.php', bool $forceVirtualHost
=
null
)
:
void
Initializes some variables according to some global PHP values.
This function should be called once in the index file with the parameters stated in the parameter list.
Name | Type | Description |
---|---|---|
$index | string | The current index file, needed for virtual host mode detection. |
$forceVirtualHost | bool | Virtual host mode is normally autodetected, but if not this can be forced by setting this to true. |


instance(
)
:
\eZSys
Returns a shared instance of the eZSys class
Type | Description |
---|---|
\eZSys |


isDebugEnabled(
)
:
bool
Return true if debugging of internals is enabled, this will display which server variables are read.
Set the option with setIsDebugEnabled().
Type | Description |
---|---|
bool |
- Deprecated
- Since 4.5, not used


isPHPVersionSufficient(
array $requiredVersion
)
:
bool
Return \c true if the PHP version is equal or higher than \a $requiredVersion.
Use: eZSys::isPHPVersionSufficient( array( 4, 1, 0 ) );
Name | Type | Description |
---|---|---|
$requiredVersion | array | Must be an array with version number |
Type | Description |
---|---|
bool |
- Deprecated
- Since 4.5


magickQuotes(
)
:
void
Returns true if magick quotes is enabled, but does nothing.
- Deprecated
- since 4.5


mergeArgumentElements(
$argumentElements
)
:
void
Name | Type | Description |
---|---|---|
$argumentElements |


phpVersion(
)
:
array
Return the PHP version as an array with the version elements.
Type | Description |
---|---|
array |
- Deprecated
- Since 4.5


phpVersionText(
)
:
string
The PHP version as text.
Type | Description |
---|---|
string |
- Deprecated
- Since 4.5, use PHP_VERSION


removeMagicQuotes(
)
:
void
Removes magic quotes
- Deprecated
- Since 4.5, magic quotes setting has been deprecated in PHP 5.3


serverVariable(
$variableName, $quiet
=
false
)
:
void
Name | Type | Description |
---|---|---|
$variableName | ||
$quiet |


setAccessPath(
array $path
=
array(), string $name
=
'undefined', bool $siteaccess
=
true
)
:
void
Set access path (parts of url that identifies siteaccess), used by {@link eZSys::indexFile()}
Name | Type | Description |
---|---|---|
$path | array | |
$name | string | An identifer of the name of the path provided {@link $AccessPath} |
$siteaccess | bool | Hints if path is siteaccess related or not, needed in case subsequesnt code suddenly changes siteaccess and needs to clear siteaccess scope |


setEnvironmentVariable(
$variableName, $variableValue
)
:
void
Name | Type | Description |
---|---|---|
$variableName | ||
$variableValue |


setInstance(
\eZSys $instance
=
null
)
:
void
Sets eZSys instance or clears it if left undefined.
Name | Type | Description |
---|---|---|
$instance | \eZSys |


setIsDebugEnabled(
bool $debug
)
:
void
Sets whether internal debugging is enabled or not.
Name | Type | Description |
---|---|---|
$debug | bool |
- Deprecated
- Since 4.5, has not effect anymore


setServerVariable(
$variableName, $variableValue
)
:
void
Name | Type | Description |
---|---|---|
$variableName | ||
$variableValue |


splitArgumentIntoElements(
$argumentText
)
:
void
Name | Type | Description |
---|---|---|
$argumentText |