diff --git a/code/site/components/com_pages/dispatcher/router/route/abstract.php b/code/site/components/com_pages/dispatcher/router/route/abstract.php index 385f16829..eb2e2bb24 100644 --- a/code/site/components/com_pages/dispatcher/router/route/abstract.php +++ b/code/site/components/com_pages/dispatcher/router/route/abstract.php @@ -125,4 +125,21 @@ public function isAbsolute() { return (bool) ($this->scheme && $this->host); } + + /** + * Generate debug info + * + * @return array + */ + public function __debugInfo() + { + $result = [ + 'route' => $this->toString(), + 'state' => $this->getState(), + 'format' => $this->getFormat(), + 'status' => $this->isResolved() ? 'resolved' : $this->isGenerated() ? 'generated' : '' + ]; + + return $result; + } } \ No newline at end of file diff --git a/code/site/components/com_pages/dispatcher/router/route/page.php b/code/site/components/com_pages/dispatcher/router/route/page.php index 4419a4f06..58b722cd3 100644 --- a/code/site/components/com_pages/dispatcher/router/route/page.php +++ b/code/site/components/com_pages/dispatcher/router/route/page.php @@ -55,4 +55,17 @@ public function setGenerated() return $this; } + + /** + * Generate debug info + * + * @return array + */ + public function __debugInfo() + { + $result = parent::__debugInfo(); + $result['page'] = $this->_page_path; + + return $result; + } } \ No newline at end of file