use \PhpOop\stragery\ConcreteStrategyA;
use \PhpOop\stragery\ConcreteStrategyB;
use \PhpOop\stragery\Context;
$a = new ConcreteStrategyA();
$b = new ConcreteStrategyB();
$context = new Context($a);
echo "Client: Strategy is set to normal sorting.\n";
$context->doSomeBusinessLogic();
echo "<br/>";
$context = new Context($b);
echo "Client: Strategy is set to reverse sorting..\n";
$context->doSomeBusinessLogic();
-
Notifications
You must be signed in to change notification settings - Fork 0
DungBuiDeveloper/php-oop-design-partern
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
- Nơi lưu trữ các design hay dùng trong php
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published