eZSys Class Reference
[Utility classes]

Easy access to various system settings. More...

List of all members.


Public Methods

 eZSys ()
 backupFilename ()
serverVariable ($variableName,$quiet=false)
 setServerVariable ($variableName,$variableValue)
path ($quiet=false)
environmentVariable ($variableName,$quiet=false)
 setEnvironmentVariable ($variableName,$variableValue)
 hasAttribute ($attr)
attribute ($attr)
 requestURI ()
 initIni (&$ini)

Static Public Methods

 osType ()
 filesystemType ()
 fileSeparator ()
 lineSeparator ()
 envSeparator ()
 varDirectory ()
 storageDirectory ()
 cacheDirectory ()
 siteDir ()
 wwwDir ()
 indexDir ()
 indexFile ()
 indexFileName ()
 hostname ()
 serverPort ()
 magickQuotes ()
 addAccessPath ($path)
 isDebugEnabled ()
 setIsDebugEnabled ($debug)
 init ($def_index="index.php")
instance ()

Public Attributes

 LineSeparator
 The line separator used in files.

 FileSeparator
 The directory separator used for files.

 EnvSeparator
 The list separator used for env variables.

 SiteDir
 The path to where all the code resides.

 AccessPath
 The access path of the current site view.

 WWWDir
 The relative directory path of the vhless setup.

 IndexFile
 The filepath for the index.

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

 FileSystemType
 The type of filesystem, is either win32 or unix. This often used to determine os specific paths.


Detailed Description

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(). In addition userIndexFile(), adminIndexFile() and xmlrpcIndexFile() can be used to fetch the index file of the user page, admin page and xmlrpc interface.

Example:

// Run the init in the index file
eZSys::init( eZINI::instance() );
print( eZSys::indexFile() );
print( eZSys::wwwDir() );

Definition at line ezsys.php.


Constructor & Destructor Documentation

eZSys::eZSys  
 

Initializes the object with settings taken from the current script run.

Definition at line ezsys.php.

References LineSeparator.

Referenced by instance().


Member Function Documentation

eZSys::addAccessPath   path [static]
 

Sets the access path which is appended to the index file.

See also:
indexFile

Definition at line ezsys.php.

References path().

& eZSys::attribute   attr
 

Returns the attribute value for $attr or null if the attribute does not exist.

Definition at line ezsys.php.

References wwwDir().

eZSys::backupFilename  
 

Returns:
the backup filename for this platform, returns .bak for win32 and ~ for unix and mac.

Definition at line ezsys.php.

References instance().

Referenced by eZINI::save().

eZSys::cacheDirectory   [static]
 

Returns:
the directory used for storing cache files.
Note:
This will include the varDirectory().

Definition at line ezsys.php.

References varDirectory().

Referenced by eZExpiryHandler::store().

& eZSys::environmentVariable   variableName,
  quiet = false
 

Returns:
the variable named $variableName in the global $_ENV variable. If the variable is not present an error is shown and null is returned.

Definition at line ezsys.php.

References eZDebug::writeError().

Referenced by environmentVariable().

eZSys::envSeparator   [static]
 

Returns the string which is used for enviroment separators on the current OS (server).

Definition at line ezsys.php.

References instance().

Referenced by init().

eZSys::fileSeparator   [static]
 

Returns the string which is used for file separators on the current OS (server).

Definition at line ezsys.php.

References instance().

Referenced by eZDir::separator().

eZSys::filesystemType   [static]
 

Returns:
the filesystem type, either "win32" or "unix"

Definition at line ezsys.php.

References instance().

eZSys::hasAttribute   attr
 

Return true if the attribute $attr is set. Available attributes are wwwdir, sitedir or indexfile

Definition at line ezsys.php.

eZSys::hostname   [static]
 

Returns the current hostname.

Definition at line ezsys.php.

References serverVariable().

Referenced by serverPort().

eZSys::indexDir   [static]
 

The filepath for the index file.

Definition at line ezsys.php.

References wwwDir().

Referenced by attribute().

eZSys::indexFile   [static]
 

The filepath for the index file with the access path appended.

See also:
indexFileName

Definition at line ezsys.php.

References instance().

Referenced by indexDir().

eZSys::indexFileName   [static]
 

The filepath for the index file.

Definition at line ezsys.php.

References instance().

eZSys::init   def_index = "index.php" [static]
 

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.

Definition at line ezsys.php.

References wwwDir().

eZSys::initIni &$    ini
 

Initializes some variables which are read from site.ini

Warning:
Do not call this before init()

Definition at line ezsys.php.

References instance().

& eZSys::instance   [static]
 

Returns the only legal instance of the eZSys class.

Definition at line ezsys.php.

References instance().

Referenced by wwwDir().

eZSys::isDebugEnabled   [static]
 

Returns:
true if debugging of internals is enabled, this will display which server variables are read. Set the option with setIsDebugEnabled().

Definition at line ezsys.php.

Referenced by init().

eZSys::lineSeparator   [static]
 

Returns the string which is used for line separators on the current OS (server).

Definition at line ezsys.php.

References LineSeparator.

Referenced by eZINI::save().

eZSys::magickQuotes   [static]
 

Returns true if magick quotes is enabled.

Definition at line ezsys.php.

eZSys::osType   [static]
 

Returns:
the os type, either "win32", "unix" or "mac"

Definition at line ezsys.php.

References instance().

& eZSys::path   quiet = false
 

Returns:
the path string for the server.

Definition at line ezsys.php.

References serverVariable().

Referenced by addAccessPath().

eZSys::requestURI  
 

Returns:
the URI used for parsing modules, views and parameters, may differ from $_SERVER['REQUEST_URI'].

Definition at line ezsys.php.

References RequestURI.

Referenced by init().

eZSys::serverPort   [static]
 

Returns:
the port of the server.

Definition at line ezsys.php.

References serverVariable().

Referenced by eZHTTPTool::createRedirectUrl().

& eZSys::serverVariable   variableName,
  quiet = false
 

Returns:
the variable named $variableName in the global $_SERVER variable. If the variable is not present an error is shown and null is returned.

Definition at line ezsys.php.

References eZDebug::writeError().

Referenced by eZDebug::writeFile().

eZSys::setEnvironmentVariable   variableName,
  variableValue
 

Sets the environment variable named $variableName to $variableValue.

Note:
Variables are only set for the current page view.

Definition at line ezsys.php.

eZSys::setIsDebugEnabled   debug [static]
 

Sets whether internal debugging is enabled or not.

Definition at line ezsys.php.

eZSys::setServerVariable   variableName,
  variableValue
 

Sets the server variable named $variableName to $variableValue.

Note:
Variables are only set for the current page view.

Definition at line ezsys.php.

eZSys::siteDir   [static]
 

The path to where all the code resides.

Definition at line ezsys.php.

References SiteDir.

Referenced by init().

eZSys::storageDirectory   [static]
 

\ return the directory used for storing various kinds of files like images, audio and more. \Note This will include the varDirectory().

Definition at line ezsys.php.

References varDirectory().

eZSys::varDirectory   [static]
 

Returns:
the directory used for storing various kinds of files like cache, temporary files and logs.

Definition at line ezsys.php.

References eZINI::instance().

Referenced by storageDirectory().

eZSys::wwwDir   [static]
 

The relative directory path of the vhless setup.

Definition at line ezsys.php.

References WWWDir.

Referenced by eZDebug::printReport().


The documentation for this class was generated from the following file:  

Exponential