We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e08dea6 + d22e654 commit 0aef975Copy full SHA for 0aef975
inc/Action/AbstractAction.php
@@ -27,8 +27,8 @@ public function __construct($actionname = '')
27
if ($actionname !== '') {
28
$this->actionname = $actionname;
29
} else {
30
- // http://stackoverflow.com/a/27457689/172068
31
- $this->actionname = strtolower(substr(strrchr(get_class($this), '\\'), 1));
+ // As of PHP 8 this seems to be the fastest way to get the name:
+ $this->actionname = strtolower((new \ReflectionClass($this))->getShortName());
32
}
33
34
0 commit comments