PHP7 Command

This commit is contained in:
Dominik Liebler
2016-09-22 09:25:26 +02:00
parent 1da5772226
commit a6b09d6b18
8 changed files with 40 additions and 77 deletions

View File

@@ -11,11 +11,11 @@ class Invoker
/**
* @var CommandInterface
*/
protected $command;
private $command;
/**
* In the invoker we find this kind of method for subscribing the command.
* There can be also a stack, a list, a fixed set...
* in the invoker we find this kind of method for subscribing the command
* There can be also a stack, a list, a fixed set ...
*
* @param CommandInterface $cmd
*/
@@ -25,12 +25,10 @@ class Invoker
}
/**
* executes the command.
* executes the command; the invoker is the same whatever is the command
*/
public function run()
{
// here is a key feature of the invoker
// the invoker is the same whatever is the command
$this->command->execute();
}
}