eZPublish  4.4
access.php File Reference

Namespaces

 index
 File containing (site)access functions.
 

Functions

 accessAllowed (eZURI $uri)
 Checks if access is allowed to a module/view based on site.ini[SiteAccessRules]Rules settings. More...
 
 accessDebugEnabled ()
 Checks if site access debug is enabled. More...
 
 accessExtraDebugEnabled ()
 Checks if extra site access debug is enabled. More...
 
 accessMatchRegexp (&$text, $reg, $num)
 Match a regex expression. More...
 
 accessMatchText (&$text, $match_pre, $match_post)
 Match a text string with pre or/or post text strings. More...
 
 accessType (eZURI $uri, $host, $port, $file)
 Goes trough the access matching rules and returns the access match. More...
 
 changeAccess (array $access)
 Changes the site access to what's defined in $access. More...
 

Variables

const EZ_ACCESS_SUBTYPE_POST 2
 
const EZ_ACCESS_SUBTYPE_PRE 1
 
const EZ_ACCESS_TYPE_DEFAULT 1
 Integer constants that identify the siteaccess matching used. More...
 
const EZ_ACCESS_TYPE_HTTP_HOST 4
 
const EZ_ACCESS_TYPE_INDEX_FILE 5
 
const EZ_ACCESS_TYPE_PORT 3
 
const EZ_ACCESS_TYPE_SERVER_VAR 7
 
const EZ_ACCESS_TYPE_STATIC 6
 
const EZ_ACCESS_TYPE_URI 2
 
const EZ_ACCESS_TYPE_URL 8
 

Function Documentation

accessAllowed ( eZURI  $uri)

Checks if access is allowed to a module/view based on site.ini[SiteAccessRules]Rules settings.

See Also
eZModule::accessAllowed()
Parameters
eZURI$uri
Returns
array An associative array with: 'result' => bool Indicates if access is allowed 'module' => string Module name 'view' => string View name 'view_checked' => bool Indicates if view access has been checked
accessDebugEnabled ( )

Checks if site access debug is enabled.

See Also
eZSiteAccess::debugEnabled()
Returns
bool
accessExtraDebugEnabled ( )

Checks if extra site access debug is enabled.

See Also
eZSiteAccess::extraDebugEnabled()
Returns
bool
accessMatchRegexp ( $text,
  $reg,
  $num 
)

Match a regex expression.

See Also
eZSiteAccess::matchRegexp()
Parameters
string$text
string$reg
int$num
Returns
string|null
accessMatchText ( $text,
  $match_pre,
  $match_post 
)

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

See Also
eZSiteAccess::matchText()
Parameters
string$text
string$match_pre
string$match_post
Returns
string|null
accessType ( eZURI  $uri,
  $host,
  $port,
  $file 
)

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

See Also
eZSiteAccess::match()
Parameters
eZURI$uri
string$host
string(numeric)$port
string$fileExample '/index.php'
Returns
array
changeAccess ( array  $access)

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

See Also
eZSiteAccess::change()
Parameters
array$accessAn associative array with 'name' (string), 'type' (int) and 'uri_part' (array).
Returns
array The $access parameter

Variable Documentation

const EZ_ACCESS_SUBTYPE_POST 2
const EZ_ACCESS_SUBTYPE_PRE 1
const EZ_ACCESS_TYPE_DEFAULT 1

Integer constants that identify the siteaccess matching used.

See Also
eZSiteAccess class constants
const EZ_ACCESS_TYPE_HTTP_HOST 4
const EZ_ACCESS_TYPE_INDEX_FILE 5
const EZ_ACCESS_TYPE_PORT 3
const EZ_ACCESS_TYPE_SERVER_VAR 7
const EZ_ACCESS_TYPE_STATIC 6
const EZ_ACCESS_TYPE_URI 2
const EZ_ACCESS_TYPE_URL 8