From a2c1148c522fcb04b544c89087022d931b0ce46e Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Tue, 1 Nov 2016 16:27:23 +0100 Subject: [PATCH] Now shows context class with . --- lib/Shell.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Shell.php b/lib/Shell.php index be58842..db5270e 100644 --- a/lib/Shell.php +++ b/lib/Shell.php @@ -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 '..':