mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-09-25 22:09:23 +02:00
documentation (commiting now from Guadeloupe)
This commit is contained in:
@@ -5,16 +5,22 @@ namespace DesignPatterns\Visitor;
|
||||
/**
|
||||
* Visitor Pattern
|
||||
*
|
||||
* An implementation of a Visitor
|
||||
* An implementation of a concrete Visitor
|
||||
*/
|
||||
class RolePrintVisitor implements RoleVisitor
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function visitGroup(Group $role)
|
||||
{
|
||||
echo "Role: " . $role->getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
public function visitUser(User $role)
|
||||
{
|
||||
echo "Role: " . $role->getName();
|
||||
|
Reference in New Issue
Block a user