PHP 클래스 Elgg\EventsService

부터: 1.9.0
상속: extends HooksRegistrationService, use trait Profilable
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Inspector $inspector = null ) Constructor
registerHandler ( $name, $type, $callback, $priority = 500 )
trigger ( $event, $type, $object = null, array $options = [] ) Triggers an Elgg event.
triggerAfter ( string $event, string $object_type, string $object = null ) : true Trigger an "After event" indicating a process has finished.
triggerBefore ( string $event, string $object_type, string $object = null ) : boolean Trigger a "Before event" indicating a process is about to begin.
triggerDeprecated ( string $event, string $object_type, string $object = null, string $message, string $version ) : boolean Trigger an event normally, but send a notice about deprecated use if any handlers are registered.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Inspector $inspector = null )
$inspector Elgg\Debug\Inspector Inspector

registerHandler() 공개 메소드

public registerHandler ( $name, $type, $callback, $priority = 500 )

trigger() 공개 메소드

Triggers an Elgg event.
또한 보기: elgg_trigger_event
또한 보기: elgg_trigger_after_event
public trigger ( $event, $type, $object = null, array $options = [] )
$options array

triggerAfter() 공개 메소드

Unlike regular events, all the handlers will be called, their return values ignored. To register for an after event, append ":after" to the event name when registering.
또한 보기: triggerBefore
부터: 2.0.0
public triggerAfter ( string $event, string $object_type, string $object = null ) : true
$event string The event type. The fired event type will be appended with ":after".
$object_type string The object type
$object string The object involved in the event
리턴 true

triggerBefore() 공개 메소드

Like regular events, a handler returning false will cancel the process and false will be returned. To register for a before event, append ":before" to the event name when registering.
또한 보기: trigger
또한 보기: triggerAfter
부터: 2.0.0
public triggerBefore ( string $event, string $object_type, string $object = null ) : boolean
$event string The event type. The fired event type will be appended with ":before".
$object_type string The object type
$object string The object involved in the event
리턴 boolean False if any handler returned false, otherwise true

triggerDeprecated() 공개 메소드

Trigger an event normally, but send a notice about deprecated use if any handlers are registered.
또한 보기: trigger
public triggerDeprecated ( string $event, string $object_type, string $object = null, string $message, string $version ) : boolean
$event string The event type
$object_type string The object type
$object string The object involved in the event
$message string The deprecation message
$version string Human-readable *release* version: 1.9, 1.10, ...
리턴 boolean