Overview

Packages

  • blesta
    • app
      • controllers
      • models
    • components
      • auth
        • ldap
        • motp
        • oath
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • events
      • exchange
        • rates
          • currency
            • layer
          • fixer
          • open
            • exchange
              • rates
          • x
            • rates
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
          • perforated
            • invoice
          • quickbooks
            • invoice
          • templates
            • default
      • modules
      • net
        • amazon
          • s3
        • http
        • net
          • geo
            • ip
      • plugins
      • reports
        • aging
          • invoices
        • client
          • data
            • portability
        • custom
          • report
        • invoice
          • creation
        • package
          • revenue
        • tax
          • liability
        • transactions
          • applied
          • received
      • security
      • session
        • cart
      • settingscollection
      • upgrades
        • tasks
      • upload
      • vcard
    • core
      • Automation
        • Tasks
          • Common
          • Task
        • Type
          • Common
          • Cron
      • Pricing
        • ItemComparator
        • MetaItem
        • Modifier
          • Type
            • Description
              • Type
                • Discount
                • Option
                • Service
                • Tax
            • Discount
            • Price
            • Proration
        • Presenter
          • Build
            • Invoice
            • InvoiceData
            • Options
            • Service
            • ServiceChange
            • ServiceData
          • Collection
          • Format
            • Fields
            • Type
              • Discount
              • Item
              • Option
              • Options
              • Package
              • Pricing
              • Service
              • Tax
          • Items
            • Invoice
            • Service
          • Type
      • ServiceProviders
      • Util
        • Captcha
          • Captchas
          • Common
        • Common
          • Traits
        • Events
          • Common
          • Handlers
          • Observers
        • Filters
          • Common
        • GeoIp
        • Input
          • Fields
            • Common
        • Tax
        • Widgets
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
      • widget
        • client
  • minPHP
    • helpers
      • color
      • data
        • structure
  • None
  • PHP

Classes

  • AbstractEvent
  • AbstractListener

Interfaces

  • EventInterface
  • Observable
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class AbstractListener

Abstract listener for events

Direct known subclasses

Blesta\Core\Util\Events\Listener
Abstract
Namespace: Blesta\Core\Util\Events\Common
Package: blesta\core\Util\Events\Common
Copyright: Copyright (c) 2019, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Util/Events/Common/AbstractListener.php
Methods summary
abstract public Blesta\Core\Util\Events\Common\EventInterface
# trigger( Blesta\Core\Util\Events\Common\EventInterface $event )

Notifies all registered listeners of the event (called in the order they were set).

Notifies all registered listeners of the event (called in the order they were set).

Parameters

$event
The event object to pass to the registered listeners

Returns

Blesta\Core\Util\Events\Common\EventInterface
The event processed
abstract public Blesta\Core\Util\Events\Common\EventInterface
# triggerUntil( Blesta\Core\Util\Events\Common\EventInterface $event )

Notifies all registered listeners of the event (called in the order they were set), until one returns true, then ceases notifying all remaining listeners.

Notifies all registered listeners of the event (called in the order they were set), until one returns true, then ceases notifying all remaining listeners.

Parameters

$event
The event object to pass to the registered listeners

Returns

Blesta\Core\Util\Events\Common\EventInterface
The event processed
public
# register( string $name, callable $callback, string $file = null )

Register a listener, to be notified when the event is triggered. Only permits one registered event per callback.

Register a listener, to be notified when the event is triggered. Only permits one registered event per callback.

Parameters

$name
The name of the event to register $callback under
$callback
The Class/Method or Object/Method or function to execute when the event is triggered.
$file

The full path to the file that contains the callback, null will default to looking in the \Blesta\Core\Util\Events\Observers\Class namespace (where 'Class' is the CamelCase format of the callback class [e.g. ClassName])

public
# unregister( string $name, callable $callback )

Unregisters a listener if the event has been registered. Will remove all copies of the registered event in the case that it was registered multiple times.

Unregisters a listener if the event has been registered. Will remove all copies of the registered event in the case that it was registered multiple times.

Parameters

$name
The name of the event to unregister $callback from
$callback
The Class/Method or Object/Method or function to unregister for the event
public array
# getRegistered( string $name )

Returns all registered listeners for the given event name

Returns all registered listeners for the given event name

Parameters

$name
The name of the event to fetch registered callbacks for

Returns

array
An array of registered callbacks
Blesta API documentation generated by ApiGen