State pattern is maintainable

state pattern change readme.rst
This commit is contained in:
ko22009
2017-04-27 09:13:45 +05:00
parent bdf8c494f0
commit ad163dc353
10 changed files with 569 additions and 397 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace DesignPatterns\Behavioral\State;
class ContextOrder extends StateOrder
{
public function getState():StateOrder
{
return static::$state;
}
public function setState(StateOrder $state)
{
static::$state = $state;
}
public function done()
{
static::$state->done();
}
public function getStatus(): string
{
return static::$state->getStatus();
}
}