mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 18:50:11 +02:00
27 lines
441 B
PHP
27 lines
441 B
PHP
<?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();
|
|
}
|
|
}
|