eZPublish  3.9
eZSSLZone Class Reference

SSL zones handling functionality. More...

Static Public Member Functions

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

Static Private Member Functions

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

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

Member Function Documentation

eZSSLZone::cacheFileName ( )
staticprivate

Referenced by clearCache(), and getSSLZones().

eZSSLZone::checkModuleView (   $module,
  $view 
)
static

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

Called from index.php.

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.

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()
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.

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

eZSSLZone::checkObject (   $module,
  $view,
  $object 
)
static

Check whether the given object should cause access mode change.

It it should, this method does not return.

eZSSLZone::clearCache ( )
staticprivate
eZSSLZone::clearCacheIfNeeded ( )
staticprivate
eZSSLZone::enabled ( )
staticprivate

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

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

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

eZSSLZone::getSSLZones ( )
staticprivate

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.

Referenced by checkNodePath().

eZSSLZone::isKeepModeView (   $module,
  $view 
)
staticprivate
Returns
true if the view is defined as 'keep'

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

eZSSLZone::switchIfNeeded (   $inSSL)
staticprivate
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).

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

eZSSLZone::viewIsInArray (   $module,
  $view,
  $moduleViews 
)
staticprivate

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

Referenced by checkModuleView(), and isKeepModeView().


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