eZPublishCommunityProject  2013.9
eZ\Bundle\EzPublishCoreBundle\Kernel Class Reference
+ Inheritance diagram for eZ\Bundle\EzPublishCoreBundle\Kernel:
+ Collaboration diagram for eZ\Bundle\EzPublishCoreBundle\Kernel:

Public Member Functions

 generateUserHash (Request $request)
 Generates current user hash. More...
 
 getCachePool ()
 Returns the Stash cache pool (for early requests like user hash generation). More...
 
 handle (Request $request, $type=HttpKernelInterface::MASTER_REQUEST, $catch=true)
 

Public Attributes

const ANONYMOUS_HASH = '38015b703d82206ebc01d17a39c727e5'
 Hash for anonymous user. More...
 
const USER_HASH_ACCEPT_HEADER = 'application/vnd.ez.UserHash+text'
 Accept header value to be used to request the user hash to the backend application. More...
 

Protected Member Functions

 canGenerateUserHash (Request $request)
 Checks if current request is allowed to generate the user hash. More...
 
 getCacheDriver ()
 Returns the cache driver to use for the Stash pool. More...
 
 getUserHashCacheTtl ()
 Returns the number of seconds the user hash is considered fresh in cache. More...
 

Private Member Functions

 isUserHashRequest (Request $request)
 Checks if $request is for pre-authentication (to generate current user's hash). More...
 

Private Attributes

 $cachePool
 
 $generatingUserHash = false
 
 $userHash
 

Member Function Documentation

eZ\Bundle\EzPublishCoreBundle\Kernel::canGenerateUserHash ( Request  $request)
protected

Checks if current request is allowed to generate the user hash.

Default behavior is to only accept local IP addresses:

  • 127.0.0.1
  • ::1
  • fe80::1
Parameters
Request$request
Returns
bool

Referenced by eZ\Bundle\EzPublishCoreBundle\Kernel\handle().

eZ\Bundle\EzPublishCoreBundle\Kernel::generateUserHash ( Request  $request)

Generates current user hash.

Parameters
\Symfony\Component\HttpFoundation\Request$request
Returns
string

Referenced by eZ\Bundle\EzPublishCoreBundle\Kernel\handle().

eZ\Bundle\EzPublishCoreBundle\Kernel::getCacheDriver ( )
protected

Returns the cache driver to use for the Stash pool.

Override this method if you prefer to use another driver (e.g. ).

See Also
getCachePool
Returns

Referenced by eZ\Bundle\EzPublishCoreBundle\Kernel\getCachePool().

eZ\Bundle\EzPublishCoreBundle\Kernel::getCachePool ( )

Returns the Stash cache pool (for early requests like user hash generation).

Returns

Referenced by eZ\Bundle\EzPublishCoreBundle\Kernel\generateUserHash().

eZ\Bundle\EzPublishCoreBundle\Kernel::getUserHashCacheTtl ( )
protected

Returns the number of seconds the user hash is considered fresh in cache.

Returns
int

Referenced by eZ\Bundle\EzPublishCoreBundle\Kernel\generateUserHash().

eZ\Bundle\EzPublishCoreBundle\Kernel::handle ( Request  $request,
  $type = HttpKernelInterface::MASTER_REQUEST,
  $catch = true 
)
eZ\Bundle\EzPublishCoreBundle\Kernel::isUserHashRequest ( Request  $request)
private

Checks if $request is for pre-authentication (to generate current user's hash).

Parameters
Request$request
Returns
bool

Referenced by eZ\Bundle\EzPublishCoreBundle\Kernel\handle().

Member Data Documentation

eZ\Bundle\EzPublishCoreBundle\Kernel::$cachePool
private
eZ\Bundle\EzPublishCoreBundle\Kernel::$generatingUserHash = false
private
eZ\Bundle\EzPublishCoreBundle\Kernel::$userHash
private
const eZ\Bundle\EzPublishCoreBundle\Kernel::ANONYMOUS_HASH = '38015b703d82206ebc01d17a39c727e5'

Hash for anonymous user.

const eZ\Bundle\EzPublishCoreBundle\Kernel::USER_HASH_ACCEPT_HEADER = 'application/vnd.ez.UserHash+text'

Accept header value to be used to request the user hash to the backend application.

Referenced by eZ\Bundle\EzPublishCoreBundle\HttpCache\handle().


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