PHP Class Gc\Mvc\Listener\DocumentListener

Inheritance: extends Zend\EventManager\AbstractListenerAggregate
Datei anzeigen Open project: gotcms/gotcms Class Usage Examples

Public Methods

Method Description
attach ( Zend\EventManager\EventManagerInterface $events ) : void Attach events
onRoute ( Zend\EventManager\EventInterface $event ) : void Check for document from route

Protected Methods

Method Description
explodePath ( string $path ) : void Explode path
findDocument ( string $path, boolean $isPreview ) : Model Find document from request uri
getLocale ( Model $document ) : void Get locale according to the locale specified in the document or its parent.
logVisitor ( boolean $isPreview, boolean $isAdmin ) : void Log visitor informations

Method Details

attach() public method

Attach events
public attach ( Zend\EventManager\EventManagerInterface $events ) : void
$events Zend\EventManager\EventManagerInterface Event manager
return void

explodePath() protected method

Explode path
protected explodePath ( string $path ) : void
$path string Url path
return void

findDocument() protected method

Find document from request uri
protected findDocument ( string $path, boolean $isPreview ) : Model
$path string Path from request uri
$isPreview boolean Is the current page is a preview
return Gc\Document\Model

getLocale() protected method

Get locale according to the locale specified in the document or its parent.
protected getLocale ( Model $document ) : void
$document Gc\Document\Model Document
return void

logVisitor() protected method

Log visitor informations
protected logVisitor ( boolean $isPreview, boolean $isAdmin ) : void
$isPreview boolean Is the current page is a preview
$isAdmin boolean Is an admin is connected
return void

onRoute() public method

Check for document from route
public onRoute ( Zend\EventManager\EventInterface $event ) : void
$event Zend\EventManager\EventInterface Mvc Event
return void