2016-08-21 02:21:39 +03:00
|
|
|
<?php
|
|
|
|
namespace api\modules\authserver\exceptions;
|
|
|
|
|
2016-08-31 13:32:14 +03:00
|
|
|
use ReflectionClass;
|
2016-08-21 02:21:39 +03:00
|
|
|
use yii\web\HttpException;
|
|
|
|
|
|
|
|
class AuthserverException extends HttpException {
|
|
|
|
|
2016-08-31 13:32:14 +03:00
|
|
|
/**
|
2019-07-15 01:59:56 +03:00
|
|
|
* Reflection is faster, weird as it may seem:
|
2016-08-31 13:32:14 +03:00
|
|
|
* @url https://coderwall.com/p/cpxxxw/php-get-class-name-without-namespace#comment_19313
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
public function getName() {
|
|
|
|
return (new ReflectionClass($this))->getShortName();
|
|
|
|
}
|
|
|
|
|
2016-08-21 02:21:39 +03:00
|
|
|
}
|