| @@ 35-44 (lines=10) @@ | ||
| 32 | *  | 
                                |
| 33 | * @return null|AbstractReceiver  | 
                                |
| 34 | */  | 
                                |
| 35 | public function getReceiver(string $receiver)  | 
                                |
| 36 |     { | 
                                |
| 37 |         $class = (string)$this->sprintf(':namespace\Receiver\:receiver', __NAMESPACE__, $receiver); | 
                                |
| 38 | ||
| 39 |         if (class_exists($class)) { | 
                                |
| 40 | return new $class($this);  | 
                                |
| 41 | }  | 
                                |
| 42 | ||
| 43 | return null;  | 
                                |
| 44 | }  | 
                                |
| 45 | ||
| 46 | }  | 
                                |
| @@ 25-34 (lines=10) @@ | ||
| 22 | *  | 
                                |
| 23 | * @return null|EventInterface  | 
                                |
| 24 | */  | 
                                |
| 25 | public function getEvent(string $event)  | 
                                |
| 26 |     { | 
                                |
| 27 |         $class = (string)$this->sprintf(':namespace\Event\:event', __NAMESPACE__, $event); | 
                                |
| 28 | ||
| 29 |         if (class_exists($class)) { | 
                                |
| 30 | return new $class($this);  | 
                                |
| 31 | }  | 
                                |
| 32 | ||
| 33 | return null;  | 
                                |
| 34 | }  | 
                                |
| 35 | }  | 
                                |