|
95 | 95 | use Jackalope\NotImplementedException; |
96 | 96 | use Symfony\Component\Console\Formatter\OutputFormatterStyle; |
97 | 97 | use Symfony\Component\Console\Formatter\OutputFormatter; |
| 98 | +use PHPCR\Shell\Console\Helper\RepositoryHelper; |
| 99 | +use PHPCR\Shell\Console\Command\PhpcrShellCommand; |
98 | 100 |
|
99 | 101 | class ShellApplication extends Application |
100 | 102 | { |
@@ -136,6 +138,16 @@ public function init() |
136 | 138 | $this->transports[$transport->getName()] = $transport;; |
137 | 139 | } |
138 | 140 |
|
| 141 | + $session = $this->getSession($this->sessionInput); |
| 142 | + |
| 143 | + $this->getHelperSet()->set(new EditorHelper($session)); |
| 144 | + $this->getHelperSet()->set(new PhpcrConsoleDumperHelper()); |
| 145 | + $this->getHelperSet()->set(new PhpcrHelper($session)); |
| 146 | + $this->getHelperSet()->set(new ResultFormatterHelper()); |
| 147 | + $this->getHelperSet()->set(new TextHelper()); |
| 148 | + $this->getHelperSet()->set(new NodeHelper($session)); |
| 149 | + $this->getHelperSet()->set(new RepositoryHelper($session->getRepository())); |
| 150 | + |
139 | 151 | // add new commands |
140 | 152 | $this->add(new AccessControlPrivilegeListCommand()); |
141 | 153 | $this->add(new RepositoryDescriptorListCommand()); |
@@ -239,15 +251,6 @@ public function init() |
239 | 251 | ->setName('workspace-purge') |
240 | 252 | ); |
241 | 253 |
|
242 | | - $this->initSession(); |
243 | | - |
244 | | - $this->getHelperSet()->set(new EditorHelper($this->session)); |
245 | | - $this->getHelperSet()->set(new PhpcrConsoleDumperHelper()); |
246 | | - $this->getHelperSet()->set(new PhpcrHelper($this->session)); |
247 | | - $this->getHelperSet()->set(new ResultFormatterHelper()); |
248 | | - $this->getHelperSet()->set(new TextHelper()); |
249 | | - $this->getHelperSet()->set(new NodeHelper($this->session)); |
250 | | - |
251 | 254 | $this->initialized = true; |
252 | 255 | } |
253 | 256 |
|
|
0 commit comments