diff --git a/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php b/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php index 66de6e9..0a9d76e 100644 --- a/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php +++ b/public-shop-api/Qandidate/Phystrix/Async/Demo/Application.php @@ -3,16 +3,15 @@ namespace Qandidate\Phystrix\Async\Demo; use Clue\React\Buzz\Browser; -use Odesk\Phystrix\AbstractCommand; +use Odesk\Phystrix\AbstractAsyncCommand; use Odesk\Phystrix\ApcStateStorage; use Odesk\Phystrix\CircuitBreakerFactory; use Odesk\Phystrix\CommandMetricsFactory; use Odesk\Phystrix\CommandFactory; +use Qandidate\Phystrix\Async\Demo\GetCatalogueCommand; +use Qandidate\Phystrix\Async\Demo\GetInventoryStatusCommand; use Zend\Config\Config; -// custom -use Odesk\Phystrix\AbstractAsyncCommand; - class Application { private $client; @@ -30,14 +29,14 @@ public function __construct(Browser $client, TimeoutFactory $timeoutFactory) public function getCatalogue() { - $command = $this->phystrix->getCommand('Qandidate\\Phystrix\\Async\\Demo\\GetCatalogueCommand', $this->client, $this->timeoutFactory); + $command = $this->phystrix->getCommand(GetCatalogueCommand::class, $this->client, $this->timeoutFactory); return $command->execute(); } public function getInventoryStatus() { - $command = $this->phystrix->getCommand('Qandidate\\Phystrix\\Async\\Demo\\GetInventoryStatusCommand', $this->client, $this->timeoutFactory); + $command = $this->phystrix->getCommand(GetInventoryStatusCommand::class, $this->client, $this->timeoutFactory); return $command->execute(); }