bluzphp /
framework
| 1 | <?php |
||
| 2 | |||
| 3 | /** |
||
| 4 | * Bluz Framework Component |
||
| 5 | * |
||
| 6 | * @copyright Bluz PHP Team |
||
| 7 | * @link https://github.com/bluzphp/framework |
||
| 8 | */ |
||
| 9 | |||
| 10 | declare(strict_types=1); |
||
| 11 | |||
| 12 | namespace Bluz\Proxy; |
||
| 13 | |||
| 14 | use Bluz\EventManager\EventManager as Instance; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Proxy to EventManager |
||
| 18 | * |
||
| 19 | * Example of usage |
||
| 20 | * <code> |
||
| 21 | * use Bluz\Proxy\EventManager; |
||
| 22 | * |
||
| 23 | * EvenManager::attach('event name', function() { |
||
| 24 | * // ... some logic |
||
| 25 | * }); |
||
| 26 | * |
||
| 27 | * EventManager::trigger('event name'); |
||
| 28 | * </code> |
||
| 29 | * |
||
| 30 | * @package Bluz\Proxy |
||
| 31 | * @author Anton Shevchuk |
||
| 32 | * |
||
| 33 | * @method static Instance getInstance() |
||
| 34 | * |
||
| 35 | * @method static Instance attach($eventName, $callback, $priority = 1) |
||
| 36 | * @see Instance::attach() |
||
| 37 | * |
||
| 38 | * @method static string|object trigger($event, $target = null, $params = null) |
||
| 39 | * @see Instance::trigger() |
||
| 40 | */ |
||
| 41 | final class EventManager |
||
| 42 | { |
||
| 43 | use ProxyTrait; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Init instance |
||
| 47 | * |
||
| 48 | * @return Instance |
||
| 49 | */ |
||
| 50 | 1 | private static function initInstance(): Instance |
|
|
0 ignored issues
–
show
|
|||
| 51 | { |
||
| 52 | 1 | return new Instance(); |
|
| 53 | } |
||
| 54 | } |
||
| 55 |
This check looks for private methods that have been defined, but are not used inside the class.