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.
nullDetails- 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
nullDetails- Type
- null | \eZSys
Methods

__construct(
array | null $serverParams
=
null
)
:
voidInitializes 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
)
:
mixedMagic 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
)
:
voidAppends 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
)
:
voidClears 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
)
:
voidReturn 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 | falseGenerate 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
)
:
voidInitializes 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(
)
:
\eZSysReturns a shared instance of the eZSys class
| Type | Description |
|---|---|
| \eZSys |

isDebugEnabled(
)
:
boolReturn 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
)
:
boolReturn \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(
)
:
voidReturns true if magick quotes is enabled, but does nothing.
- Deprecated
- since 4.5

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

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

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

removeMagicQuotes(
)
:
voidRemoves 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
)
:
voidSet 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
)
:
voidSets eZSys instance or clears it if left undefined.
| Name | Type | Description |
|---|---|---|
| $instance | \eZSys |

setIsDebugEnabled(
bool $debug
)
:
voidSets 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 |