Repository navigation
Internals Redirect Breadcrumbs BreadCrumbs
Framework Internals · Subsystem overview · Developer guide
Source: awt_src/classes/redirect/breadcrumbs/BreadCrumbs.php · Snapshot 8411f4287706.
Redirect stores a target consumed by the web bootstrap. Breadcrumbs keeps the last rendered page in the PHP session.
use session\SessionHandler;class BreadCrumbs extends SessionHandlerSource description (behavioral corrections are recorded in Known discrepancies):
The BreadCrumbs class extends the SessionHandler class and is responsible for managing the last visited page (breadcrumbs) in a session.
Declarations below preserve visibility, type, default and modifiers exactly. A typed property without an initializer remains uninitialized until its constructor or another method assigns it. Mutable fields belong to this instance unless marked static; readonly fields can be initialized once. Constructor-promoted properties are also listed below.
| Member | Declaration | Purpose or source contract |
|---|---|---|
| $last | private string $last; |
Used by __construct(), setLast(), getLast(). |
| Method | Signature |
|---|---|
| __construct | public function __construct() |
| setLast | public function setLast(): void |
| getLast | public function getLast(): string |
public function __construct()State writes: $this->last.
Implementation, validation guards and interaction order
public function __construct()
{
$this->SessionHandler();
if (isset($_SESSION['last_page'])) {
$this->last = $_SESSION["last_page"];
} else {
$this->last = $_SERVER["REQUEST_URI"];
$_SESSION["last_page"] = $this->last;
}
}public function setLast(): voidSets the last page URL to the current page URL and stores it in the session.
This method updates both the $last property and the session's last_page variable
to the current request URI ($_SERVER["REQUEST_URI"]).
State writes: $this->last.
Implementation, validation guards and interaction order
/**
* Sets the last page URL to the current page URL and stores it in the session.
*
* This method updates both the `$last` property and the session's `last_page` variable
* to the current request URI (`$_SERVER["REQUEST_URI"]`).
*/
public function setLast(): void
{
$this->last = $_SERVER["REQUEST_URI"];
$_SESSION["last_page"] = $this->last;
}public function getLast(): stringReturns the last visited page URL.
@return string The value of $last, which stores the last page visited.
Return expressions (including local callbacks): $this->last.
Implementation, validation guards and interaction order
/**
* Returns the last visited page URL.
*
* @return string The value of `$last`, which stores the last page visited.
*/
public function getLast(): string
{
return $this->last;
}AWT Framework Wiki · Home · Installation Guide · Developer Guide · Framework Internals
Philosophy · Architecture · Known discrepancies · Verification
Installation Guide
Developer Guide
- Learning sequence
- First package
- Package structure
- Lifecycle
- Runtimes
- Events and objects
- Routing and controllers
- Views and resources
- Database and models
- Storage and caching
- Configuration and CLI
- Responses and errors
- Extension points
Framework Internals
- Architecture
- Bootstrap
- Packages
- Runtime
- Events and context
- Objects
- HTTP routing and controllers
- Rendering
- Blade integration
- Database
- Models
- Storage and caching
- Settings
- CLI
- Identity and sessions
- Responses
- Errors
- Complete source inventory
Documentation notes