it was created the Behavioral namespace and append its patterns

This commit is contained in:
Antonio Spinelli
2014-04-15 22:25:48 -03:00
parent 2f7837927f
commit 646e0e2fd9
47 changed files with 88 additions and 77 deletions

View File

@@ -1,20 +1,29 @@
<?php
namespace DesignPatterns\Mediator;
namespace DesignPatterns\Behavioral\Mediator;
use DesignPatterns\Mediator\Subsystem;
use DesignPatterns\Behavioral\Mediator\Subsystem;
/**
* Mediator is the concrete Mediator for this design pattern.
*
* In this example, I have made a "Hello World" with the Mediator Pattern.
*/
class Mediator implements MediatorInterface
{
// you could have an array
/**
* @var Subsystem\Server
*/
protected $server;
/**
* @var Subsystem\Database
*/
protected $database;
/**
* @var Subsystem\Client
*/
protected $client;
/**
@@ -39,7 +48,6 @@ class Mediator implements MediatorInterface
/**
* query db
*
* @return mixed
*/
public function queryDb()