for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace HnrAzevedo\Router;
trait CurrentTrait
{
use Helper;
protected array $currentRoute = [];
public static function current(): array
self::getInstance()->hasCurrentRoute();
return self::getInstance()->getCurrent();
}
public static function currentName(): string
return self::getInstance()->getCurrent()['name'];
public static function currentAction()
return self::getInstance()->getCurrent()['action'];
protected function getCurrent(): array
return $this->currentRoute;