PHP Interface ManaPHP\ComponentInterface

Show file Open project: manaphp/manaphp Interface Usage Examples

Public Methods

Method Description
attachEvent ( string $event, callable $handler ) : static Attach a listener to the events manager
dump ( ) : array
fireEvent ( string $event, array $data = [] ) : boolean | null Fires an event in the events manager causing that the active listeners will be notified about it
getDependencyInjector ( ) : Di Returns the internal dependency injector
setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static Sets the dependency injector

Method Details

attachEvent() public method

Attach a listener to the events manager
public attachEvent ( string $event, callable $handler ) : static
$event string
$handler callable
return static

dump() public method

public dump ( ) : array
return array

fireEvent() public method

Fires an event in the events manager causing that the active listeners will be notified about it
public fireEvent ( string $event, array $data = [] ) : boolean | null
$event string
$data array
return boolean | null

getDependencyInjector() public method

Returns the internal dependency injector
public getDependencyInjector ( ) : Di
return Di

setDependencyInjector() public method

Sets the dependency injector
public setDependencyInjector ( ManaPHP\DiInterface $dependencyInjector ) : static
$dependencyInjector ManaPHP\DiInterface
return static