Hawk - PHP documentation
  • Namespace
  • Class
  • Tree

Namespaces

  • Hawk
    • View
      • Plugins

Classes

  • App
  • ButtonInput
  • Cache
  • CheckboxInput
  • ColorInput
  • Conf
  • Controller
  • Crypto
  • DatabaseSessionHandler
  • DatetimeInput
  • DB
  • DBExample
  • DeleteInput
  • Dialogbox
  • EmailInput
  • ErrorHandler
  • Event
  • FileInput
  • FileSystem
  • FloatInput
  • Form
  • FormFieldset
  • FormInput
  • GenericModel
  • GifImage
  • HawkApi
  • HawkUpdater
  • HiddenInput
  • HtmlInput
  • HTTPRequest
  • Icon
  • Image
  • IntegerInput
  • ItemList
  • ItemListField
  • JpegImage
  • Lang
  • Language
  • LeftSidebarTab
  • Less
  • Logger
  • Mail
  • MenuItem
  • Model
  • NoSidebarTab
  • NumberInput
  • ObjectInput
  • Option
  • Panel
  • PasswordInput
  • Permission
  • Plugin
  • PluginInstaller
  • PngImage
  • ProfileQuestion
  • ProfileQuestionValue
  • RadioInput
  • Request
  • Response
  • RightSidebarTab
  • Role
  • RolePermission
  • Route
  • Router
  • SelectInput
  • Session
  • Singleton
  • SubmitInput
  • Tabs
  • TextareaInput
  • TextInput
  • Theme
  • TimeInput
  • Upload
  • User
  • View
  • ViewPlugin
  • Widget
  • WysiwygInput

Traits

  • Utils

Exceptions

  • AppStopException
  • DBExampleException
  • DBException
  • FileSystemException
  • HawkApiException
  • ImageException
  • MailException
  • UploadException
  • ViewException

Class Event

This class describes script events that can be triggers and listened

Namespace: Hawk
Package: Core
Located at Event.php

Methods summary

public
# __construct( string $name, array $data = array() )

Constructor. Create a new event

Constructor. Create a new event

Parameters

$name
The event name
$data
The event initial data
public string
# getName( )

Get the event name

Get the event name

Returns

string
The event name
public mixed
# getData( string $prop = null )

Get event data. This method is used to get all the data of the event, or a specific data property

Get event data. This method is used to get all the data of the event, or a specific data property

Parameters

$prop
If set, this method will return the data property, else return all the event data

Returns

mixed
The event data
public
# setData( string $prop, mixed $value )

Set data to the event

Set data to the event

Parameters

$prop
The property name to set in the data
$value
The value to set
public static
# on( string $name, callable $action, integer $order = self::ORDER_LAST )

Add a listener on a event type

Add a listener on a event type

Parameters

$name
The event name
$action
The action to perform when the event is triggered. This function take as argument the event itself
$order
The listener order. If set, all the listeners on the same event type are executed following their order
public static
# unbind( string $name )

Remove all listeners on a event type

Remove all listeners on a event type

Parameters

$name
The event name
public
# trigger( )

Trigger the event

Trigger the event

Constants summary

integer ORDER_LAST

Listener order as last

Listener order as last

# -1
integer ORDER_FIRST

Listener order as first

Listener order as first

# -2
Hawk - PHP documentation API documentation generated by ApiGen