start a restructure

This commit is contained in:
Antonio Spinelli
2014-03-21 18:03:44 -03:00
parent b0b0d4a1a4
commit e59d70a0ac
180 changed files with 21 additions and 16 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace DesignPatterns\Visitor;
/**
* Visitor Pattern
*
* The contract for the visitor.
*
* Note 1 : in C++ or java, with method polymorphism based on type-hint, there are many
* methods visit() with different type for the 'role' parameter.
*
* Note 2 : the visitor must not choose itself which method to
* invoke, it is the Visitee that make this decision.
*/
interface RoleVisitorInterface
{
/**
* Visit a User object
*
* @param \DesignPatterns\Visitor\User $role
*/
public function visitUser(User $role);
/**
* Visit a Group object
*
* @param \DesignPatterns\Visitor\Group $role
*/
public function visitGroup(Group $role);
}