File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 22namespace Cubex \Console ;
33
44use Cubex \Console \Commands \BuiltInWebServer ;
5+ use Cubex \CubexAware ;
56use Cubex \CubexAwareTrait ;
67use Packaged \Config \ConfigProviderInterface ;
78use Packaged \Context \ContextAware ;
@@ -129,6 +130,11 @@ protected function _prepareCommand(Command $command): Command
129130 {
130131 $ command ->setContext ($ this ->getContext ());
131132 }
133+
134+ if ($ this ->hasCubex () && $ command instanceof CubexAware)
135+ {
136+ $ command ->setCubex ($ this ->getCubex ());
137+ }
132138 return $ command ;
133139 }
134140
Original file line number Diff line number Diff line change 11<?php
22namespace Cubex \Console ;
33
4+ use Cubex \CubexAware ;
5+ use Cubex \CubexAwareTrait ;
46use Packaged \Context \ContextAware ;
57use Packaged \Context \ContextAwareTrait ;
68use Packaged \DocBlock \DocBlockParser ;
2325/**
2426 * Extended Command to support public properties for arguments
2527 */
26- abstract class ConsoleCommand extends Command implements ContextAware
28+ abstract class ConsoleCommand extends Command implements ContextAware, CubexAware
2729{
2830 use ContextAwareTrait;
31+ use CubexAwareTrait;
2932
3033 /**
3134 * @var InputInterface
You can’t perform that action at this time.
0 commit comments