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

  • Event
  • EventFactory
  • Listener
  • Observer
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Class Listener

Event Handler

Stores callbacks for particular events that may be executed when the event is triggered. Events are static, so each instance may register events triggered in this or other instances of the Event handler.

Blesta\Core\Util\Events\Common\AbstractListener
Extended by Blesta\Core\Util\Events\Listener
Namespace: Blesta\Core\Util\Events
Package: blesta\core\Util\Events
Copyright: Copyright (c) 2018, Phillips Data, Inc.
License: The Blesta License Agreement
Link: Blesta
Located at core/Util/Events/Listener.php
Methods summary
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
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 = null, 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; A null callback will default to a system observer matching the given $name

$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])

Overrides

Blesta\Core\Util\Events\Common\AbstractListener::register()
public
# unregister( string $name, callable $callback = null )

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; A null callback will default to a system observer matching the given $name

Overrides

Blesta\Core\Util\Events\Common\AbstractListener::unregister()
Methods inherited from Blesta\Core\Util\Events\Common\AbstractListener
getRegistered()
Blesta API documentation generated by ApiGen