eZ Publish  [trunk]
eZSiteAccess Class Reference

List of all members.

Public Member Functions

 eZSiteAccess ()

Static Public Member Functions

static change (array $access, eZINI $siteINI=null)
 Changes the site access to what's defined in $access.
static current ()
 Get current siteaccess data if set, see eZSiteAccess::match() for array structure.
static debugEnabled ()
 Checks if site access debug is enabled.
static extraDebugEnabled ()
 Checks if extra site access debug is enabled.
static findPathToSiteAccess ($siteAccess)
 Returns path to site access.
static getIni ($siteAccess, $settingFile= 'site.ini')
 Loads ini environment for a specific siteaccess.
static load (array $access, eZINI $siteINI=null)
 Reloads extensions and changes siteaccess globally If you only want changes on a instance of ini, use eZSiteAccess::getIni().
static match (eZURI $uri, $host, $port=80, $file= '/index.php')
 Goes trough the access matching rules and returns the access match.
static matchRegexp (&$text, $reg, $num)
 Match a regex expression.
static matchText (&$text, $match_pre, $match_post)
 Match a text string with pre or/or post text strings.
static reInitialise ()
 Re-initialises the current site access If a siteaccess is set, then executes eZSiteAccess::load().
static saNameByLanguage ($language)
 Gets siteaccess name by language based on site.ini\[RegionalSettings][] if defined otherwise by convention ( eng-GB -> eng ), in both cases sa needs to be in site.ini\[SiteAccessSettings][] as well to be valid.
static siteAccessList ()

Public Attributes

const SUBTYPE_POST = 2
const SUBTYPE_PRE = 1
const TYPE_DEFAULT = 1
 Integer constants that identify the siteaccess matching used.
const TYPE_HTTP_HOST = 4
const TYPE_HTTP_HOST_URI = 9
const TYPE_INDEX_FILE = 5
const TYPE_PORT = 3
const TYPE_SERVER_VAR = 7
const TYPE_STATIC = 6
const TYPE_URI = 2
const TYPE_URL = 8

Detailed Description

Definition at line 16 of file ezsiteaccess.php.


Member Function Documentation

static eZSiteAccess::change ( array $  access,
eZINI siteINI = null 
) [static]

Changes the site access to what's defined in $access.

It will change the access path in eZSys and prepend an override dir to eZINI Note: does not load extensions, use eZSiteAccess::load() if you want that

Since:
4.4
Parameters:
array$accessAn associative array with 'name' (string), 'type' (int) and 'uri_part' (array). See eZSiteAccess::match() for array structure definition
eZINI | null$siteINIOptional parameter to be able to only do change on specific instance of site.ini hence skip changing eZSys access paths (but not siteaccess, see eZSiteAccess::load())
Returns:
array The $access parameter

Definition at line 493 of file ezsiteaccess.php.

Referenced by changeAccess(), eZCheckValidity(), eZScript\initialize(), load(), eZWebDAVContentServer\setCurrentSite(), and eZWebDAVContentBackend\setCurrentSite().

static eZSiteAccess::current ( ) [static]

Get current siteaccess data if set, see eZSiteAccess::match() for array structure.

Since:
4.4 return array|null

Definition at line 641 of file ezsiteaccess.php.

Referenced by ezpMultivariateTestHandler\execute(), and ezpMobileDeviceRegexpFilter\redirect().

static eZSiteAccess::debugEnabled ( ) [static]

Checks if site access debug is enabled.

Since:
4.4
Deprecated:
Should use debug.ini conditions instead of extra settings
Returns:
bool

Definition at line 690 of file ezsiteaccess.php.

Referenced by accessDebugEnabled().

static eZSiteAccess::extraDebugEnabled ( ) [static]

Checks if extra site access debug is enabled.

Since:
4.4
Deprecated:
Should use debug.ini conditions instead of extra settings
Returns:
bool

Definition at line 703 of file ezsiteaccess.php.

Referenced by accessExtraDebugEnabled().

Constructor

Definition at line 39 of file ezsiteaccess.php.

static eZSiteAccess::findPathToSiteAccess ( siteAccess) [static]

Returns path to site access.

Parameters:
string$siteAccess
Returns:
string|false Return path to siteacces or false if invalid

Definition at line 72 of file ezsiteaccess.php.

Referenced by eZINI\getSiteAccessIni(), and removeRelatedCache().

static eZSiteAccess::getIni ( siteAccess,
settingFile = 'site.ini' 
) [static]

Loads ini environment for a specific siteaccess.

eg: $ini = eZSiteAccess::getIni( 'eng', 'site.ini' );

Since:
4.4
Parameters:
string$siteAccess
string$settingFile
Returns:
eZINI

Definition at line 597 of file ezsiteaccess.php.

Referenced by eZStaticCache\buildCacheDirPart(), ezpLanguageSwitcher\getSiteAccessIni(), and ezpLanguageSwitcher\setupTranslationSAList().

static eZSiteAccess::load ( array $  access,
eZINI siteINI = null 
) [static]

Reloads extensions and changes siteaccess globally If you only want changes on a instance of ini, use eZSiteAccess::getIni().

Since:
4.4
Parameters:
array$accessAn associative array with 'name' (string), 'type' (int) and 'uri_part' (array). See eZSiteAccess::match() for array structure definition
eZINI | null$siteINIOptional parameter to be able to only do change on specific instance of site.ini If set, then global siteacceess will not be changed as well.
Returns:
array The $access parameter

Definition at line 551 of file ezsiteaccess.php.

Referenced by eZContentCacheManager\generateObjectViewCache(), getIni(), and reInitialise().

static eZSiteAccess::match ( eZURI uri,
host,
port = 80,
file = '/index.php' 
) [static]

Goes trough the access matching rules and returns the access match.

The returned match is an associative array with: name => string Name of the siteaccess (same as folder name) type => int The constant that represent the matching used uri_part => array(string) List of path elements that was used in start of url for the match

Since:
4.4
Parameters:
eZURI$uri
string$host
string(numeric)$port
string$fileExample '/index.php'
Returns:
array

Definition at line 109 of file ezsiteaccess.php.

Referenced by accessType().

static eZSiteAccess::matchRegexp ( &$  text,
reg,
num 
) [static]

Match a regex expression.

Since:
4.4
Parameters:
string$text
string$reg
int$num
Returns:
string|null

Definition at line 418 of file ezsiteaccess.php.

Referenced by accessMatchRegexp(), and match().

static eZSiteAccess::matchText ( &$  text,
match_pre,
match_post 
) [static]

Match a text string with pre or/or post text strings.

Since:
4.4
Parameters:
string$text
string$match_pre
string$match_post
Returns:
string|null

Definition at line 438 of file ezsiteaccess.php.

Referenced by accessMatchText(), and match().

static eZSiteAccess::reInitialise ( ) [static]

Re-initialises the current site access If a siteaccess is set, then executes eZSiteAccess::load().

Returns:
bool True if re-initialisation was successful

Definition at line 468 of file ezsiteaccess.php.

static eZSiteAccess::saNameByLanguage ( language) [static]

Gets siteaccess name by language based on site.ini\[RegionalSettings][] if defined otherwise by convention ( eng-GB -> eng ), in both cases sa needs to be in site.ini\[SiteAccessSettings][] as well to be valid.

Since:
4.5
Parameters:
string$languageeg: eng-GB
Returns:
string|null

Definition at line 657 of file ezsiteaccess.php.

static eZSiteAccess::siteAccessList ( ) [static]

Definition at line 43 of file ezsiteaccess.php.


Member Data Documentation

Definition at line 34 of file ezsiteaccess.php.

Definition at line 33 of file ezsiteaccess.php.

Integer constants that identify the siteaccess matching used.

Since:
4.4 Was earlier in access.php as normal constants

Definition at line 23 of file ezsiteaccess.php.

Referenced by eZScript\initialize(), and match().

Definition at line 26 of file ezsiteaccess.php.

Referenced by match().

Definition at line 31 of file ezsiteaccess.php.

Referenced by match().

Definition at line 27 of file ezsiteaccess.php.

Referenced by match().

Definition at line 25 of file ezsiteaccess.php.

Referenced by match().

Definition at line 29 of file ezsiteaccess.php.

Referenced by match().

Definition at line 30 of file ezsiteaccess.php.


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