PHP 클래스 Neos\Neos\EventLog\Domain\Service\EventEmittingService

- TODO: explain Nested events
파일 보기 프로젝트 열기: neos/neos-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$currentAccountIdentifier string
$enabled boolean
$eventContext array If the stack is empty, the events are created top-level.
$eventRepository Neos\Neos\EventLog\Domain\Repository\EventRepository
$lastGeneratedEvent Neos\Neos\EventLog\Domain\Model\Event a reference to the last-generated event

공개 메소드들

메소드 설명
add ( Event $nodeEvent ) : void Add the passed event (which has been generated by generate()) to persistence.
emit ( string $eventType, array $data, string $eventClassName = Event::class ) : Event Convenience method for generating an event and directly adding it afterwards to persistence.
generate ( string $eventType, array $data, string $eventClassName = Event::class ) : Event Generates a new event, without persisting it yet.
isEnabled ( ) : boolean
popContext ( ) : void Remove an element from the context stack. Is the reverse operation to pushContext().
pushContext ( ) : void Push the last-generated event onto the context, nesting all further generated events underneath the top-level one.
setCurrentAccountIdentifier ( string $accountIdentifier ) : void Set the current account identifier

보호된 메소드들

메소드 설명
getCurrentContext ( ) : Event | null The current context-event or NULL if none exists currently.

메소드 상세

add() 공개 메소드

This only happens for top-level-events. All events which are attached to some parent event are persisted together with the parent.
또한 보기: emit()
public add ( Event $nodeEvent ) : void
$nodeEvent Neos\Neos\EventLog\Domain\Model\Event
리턴 void

emit() 공개 메소드

Convenience method for generating an event and directly adding it afterwards to persistence.
public emit ( string $eventType, array $data, string $eventClassName = Event::class ) : Event
$eventType string
$data array
$eventClassName string
리턴 Neos\Neos\EventLog\Domain\Model\Event

generate() 공개 메소드

Note: Make sure to call add($event) afterwards.
또한 보기: emit()
public generate ( string $eventType, array $data, string $eventClassName = Event::class ) : Event
$eventType string
$data array
$eventClassName string
리턴 Neos\Neos\EventLog\Domain\Model\Event

getCurrentContext() 보호된 메소드

The current context-event or NULL if none exists currently.
protected getCurrentContext ( ) : Event | null
리턴 Neos\Neos\EventLog\Domain\Model\Event | null

isEnabled() 공개 메소드

public isEnabled ( ) : boolean
리턴 boolean TRUE if the event log is enabled and events should be captured

popContext() 공개 메소드

Remove an element from the context stack. Is the reverse operation to pushContext().
public popContext ( ) : void
리턴 void

pushContext() 공개 메소드

Push the last-generated event onto the context, nesting all further generated events underneath the top-level one.
public pushContext ( ) : void
리턴 void

setCurrentAccountIdentifier() 공개 메소드

Set the current account identifier
public setCurrentAccountIdentifier ( string $accountIdentifier ) : void
$accountIdentifier string
리턴 void

프로퍼티 상세

$currentAccountIdentifier 보호되어 있는 프로퍼티

protected string $currentAccountIdentifier
리턴 string

$enabled 보호되어 있는 프로퍼티

protected bool $enabled
리턴 boolean

$eventContext 보호되어 있는 프로퍼티

If the stack is empty, the events are created top-level.
protected array $eventContext
리턴 array

$eventRepository 보호되어 있는 프로퍼티

protected EventRepository,Neos\Neos\EventLog\Domain\Repository $eventRepository
리턴 Neos\Neos\EventLog\Domain\Repository\EventRepository

$lastGeneratedEvent 보호되어 있는 프로퍼티

a reference to the last-generated event
protected Event,Neos\Neos\EventLog\Domain\Model $lastGeneratedEvent
리턴 Neos\Neos\EventLog\Domain\Model\Event