mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-01 12:40:11 +02:00
reworked the Mediator pattern
This commit is contained in:
11
Behavioral/Mediator/UserRepository.php
Normal file
11
Behavioral/Mediator/UserRepository.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace DesignPatterns\Behavioral\Mediator;
|
||||
|
||||
class UserRepository extends Colleague
|
||||
{
|
||||
public function getUserName(string $user): string
|
||||
{
|
||||
return 'User: ' . $user;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user