mirror of
https://github.com/elyby/accounts.git
synced 2024-12-24 22:29:51 +05:30
20 lines
444 B
PHP
20 lines
444 B
PHP
<?php
|
|
namespace api\modules\authserver\exceptions;
|
|
|
|
use ReflectionClass;
|
|
use yii\web\HttpException;
|
|
|
|
class AuthserverException extends HttpException {
|
|
|
|
/**
|
|
* Reflection is faster, weird as it may seem:
|
|
* @url https://coderwall.com/p/cpxxxw/php-get-class-name-without-namespace#comment_19313
|
|
*
|
|
* @return string
|
|
*/
|
|
public function getName() {
|
|
return (new ReflectionClass($this))->getShortName();
|
|
}
|
|
|
|
}
|