eZ Publish  [4.2]
eZSSLZone Class Reference

SSL zones handling functionality. More...

List of all members.

Static Public Member Functions

static checkModuleView ($module, $view)
 Decide whether we should change access mode for this module view or not.
static checkNode ($module, $view, &$node, $redirect=true)
 Check whether the given node should cause access mode change.
static checkNodeID ($module, $view, $nodeID)
 Check whether the given node should cause access mode change.
static checkNodePath ($module, $view, $pathString, $redirect=true)
 Check whether the given node should cause access mode change.
static checkObject ($module, $view, $object)
 Check whether the given object should cause access mode change.

Public Attributes

const DEFAULT_SSL_PORT = 443

Static Private Member Functions

static cacheFileName ()
static clearCache ()
static clearCacheIfNeeded ()
static enabled ()
 Returns true if the SSL zones functionality is enabled, false otherwise.
static getSSLZones ()
 Load content SSL zones definitions.
static isKeepModeView ($module, $view)
static switchIfNeeded ($inSSL)
static viewIsInArray ($module, $view, $moduleViews)
 Checks if a given module/view pair is in the given list of views.

Detailed Description

SSL zones handling functionality.

Using functionality of this class you can mark certain parts of you site as "SSL zones". After that users will be able to access those parts only over SSL. When entering an SSL zone, user will be automatically switched to SSL. When leaving an SSL zone, user will be automatically switched to plain HTTP. Such a switch is called "access mode change" in the comments below.

SSL zones may be defined on either module/view basis, or on subtree basis.

For more details pleaase see doc/feautures/3.8/ssl_zones.txt

Definition at line 47 of file ezsslzone.php.


Member Function Documentation

static eZSSLZone::cacheFileName ( ) [static, private]

Definition at line 74 of file ezsslzone.php.

Referenced by clearCache(), and getSSLZones().

static eZSSLZone::checkModuleView ( module,
view 
) [static]

Decide whether we should change access mode for this module view or not.

Called from index.php.

Definition at line 460 of file ezsslzone.php.

static eZSSLZone::checkNode ( module,
view,
&$  node,
redirect = true 
) [static]

Check whether the given node should cause access mode change.

It it should, this method does not return.

Definition at line 326 of file ezsslzone.php.

static eZSSLZone::checkNodeID ( module,
view,
nodeID 
) [static]

Check whether the given node should cause access mode change.

It it should, this method does not return.

See also:
checkNode()

Definition at line 290 of file ezsslzone.php.

static eZSSLZone::checkNodePath ( module,
view,
pathString,
redirect = true 
) [static]

Check whether the given node should cause access mode change.

It it should, this method does not return.

Definition at line 348 of file ezsslzone.php.

Referenced by checkNode(), checkNodeID(), and checkObject().

static eZSSLZone::checkObject ( module,
view,
object 
) [static]

Check whether the given object should cause access mode change.

It it should, this method does not return.

Definition at line 388 of file ezsslzone.php.

static eZSSLZone::clearCache ( ) [static, private]

Definition at line 91 of file ezsslzone.php.

Referenced by clearCacheIfNeeded(), and eZContentCacheManager\clearContentCache().

static eZSSLZone::clearCacheIfNeeded ( ) [static, private]

Definition at line 82 of file ezsslzone.php.

Referenced by eZContentCacheManager\clearContentCacheIfNeeded().

static eZSSLZone::enabled ( ) [static, private]

Returns true if the SSL zones functionality is enabled, false otherwise.

The result is cached in memory to save time on multiple invocations.

Definition at line 58 of file ezsslzone.php.

Referenced by checkModuleView(), checkNode(), checkNodeID(), checkNodePath(), checkObject(), and clearCacheIfNeeded().

static eZSSLZone::getSSLZones ( ) [static, private]

Load content SSL zones definitions.

Substitute URIs with corresponding path strings (e.g. "/news" would be subsituted with "/1/2/50"). The result is cached in memory to save time on multiple invocations. It is also saved in a cache file that is usually updated by eZContentCacheManager along with content cache.

Definition at line 112 of file ezsslzone.php.

Referenced by checkNodePath().

static eZSSLZone::isKeepModeView ( module,
view 
) [static, private]
Returns:
true if the view is defined as 'keep'

Definition at line 210 of file ezsslzone.php.

Referenced by checkNode(), checkNodeID(), checkNodePath(), and checkObject().

static eZSSLZone::switchIfNeeded ( inSSL) [static, private]
Parameters:
$inSSLThe desired access mode.

Change access mode (HTTP/HTTPS):

  • If previous mode was HHTP but $inSSL is true, we switch to SSL.
  • If previous mode was SSL but $inSSL is false, we switch to HTTP.
  • Otherwise no mode change is occured.

Mode change is done by redirect to the same URL, but with changed protocol (http/https) and TCP port.

In case of mode change this method does not return (exit() is called).

Definition at line 241 of file ezsslzone.php.

Referenced by checkModuleView(), checkNodePath(), and checkObject().

static eZSSLZone::viewIsInArray ( module,
view,
moduleViews 
) [static, private]

Checks if a given module/view pair is in the given list of views.

Wildcard matching on view name is done.

Returns:
2 if wildcard match occurs on the given view 1 if exact match occurs on the given view 0 if the view is not found in the list

Definition at line 197 of file ezsslzone.php.

Referenced by checkModuleView(), and isKeepModeView().


Member Data Documentation

Definition at line 49 of file ezsslzone.php.

Referenced by eZSys\isSSLNow(), eZSys\serverURL(), and switchIfNeeded().


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