Now shows context class with .

This commit is contained in:
Chris 2016-11-01 16:27:23 +01:00
parent 81dea747b2
commit a2c1148c52
1 changed files with 4 additions and 2 deletions

View File

@ -199,10 +199,12 @@ class Shell
{
switch ($command) {
case '.':
printf("context<%s>: %s\n", $this->context->getName(), json_encode($this->context->getData()));
$type = basename(strtr(get_class($this->context), "\\", "/"));
printf("%s<%s>: %s\n", $type, $this->context->getName(), json_encode($this->context->getData()));
$level = 0;
foreach ($this->contextStack as $context) {
printf(" %s- context<%s>\n", str_repeat(" ",$level++), $context->getName());
$type = basename(strtr(get_class($context), "\\", "/"));
printf(" %s- %s<%s>\n", str_repeat(" ",$level++), $type, $context->getName());
}
break;
case '..':