mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-07 07:26:32 +02:00
refactored State pattern example
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace DesignPatterns\Behavioral\State;
|
||||
|
||||
class CreateOrder extends StateOrder
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->setStatus('created');
|
||||
}
|
||||
|
||||
protected function done()
|
||||
{
|
||||
static::$state = new ShippingOrder();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user