mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 10:40:17 +02:00
33 lines
542 B
PHP
33 lines
542 B
PHP
<?php
|
|
|
|
namespace DesignPatterns\Behavioral\State;
|
|
|
|
abstract class StateOrder
|
|
{
|
|
/**
|
|
* @var array
|
|
*/
|
|
private $details;
|
|
|
|
/**
|
|
* @var StateOrder $state
|
|
*/
|
|
protected static $state;
|
|
|
|
/**
|
|
* @return mixed
|
|
*/
|
|
abstract protected function done();
|
|
|
|
protected function setStatus(string $status)
|
|
{
|
|
$this->details['status'] = $status;
|
|
$this->details['updatedTime'] = time();
|
|
}
|
|
|
|
protected function getStatus(): string
|
|
{
|
|
return $this->details['status'];
|
|
}
|
|
}
|