EmitterTrait

trait OC\Hooks\EmitterTrait
Source:lib/private/Hooks/EmitterTrait.php#30

Properties

protected static property OC\Hooks\EmitterTrait::$listeners
Source:lib/private/Hooks/EmitterTrait.php#35
Type:callable[][]

Methods

public OC\Hooks\EmitterTrait::listen($scope, $method, $callback)
Source:

lib/private/Hooks/EmitterTrait.php#43

Parameters:
  • $scope (string)
  • $method (string)
  • $callback (callable)
Deprecated:

18.0.0 use \OCP\EventDispatcher\IEventDispatcher::addListener

public OC\Hooks\EmitterTrait::removeListener($scope=null, $method=null, $callback=null)
Source:

lib/private/Hooks/EmitterTrait.php#59

Parameters:
  • $scope (string) optional
  • $method (string) optional
  • $callback (callable) optional
Deprecated:

18.0.0 use \OCP\EventDispatcher\IEventDispatcher::removeListener

protected OC\Hooks\EmitterTrait::emit($scope, $method, $arguments=[])
Source:

lib/private/Hooks/EmitterTrait.php#103

Parameters:
  • $scope (string)
  • $method (string)
  • $arguments (array) optional
Deprecated:

18.0.0 use \OCP\EventDispatcher\IEventDispatcher::dispatchTyped