Добавлен кастомный ErrorHandler для форматирования ошибок authserver'а в соответствии с ожиданиями лаунчера

This commit is contained in:
ErickSkrauch
2016-08-31 13:32:14 +03:00
parent 9c658f5bd9
commit 66e266692c
3 changed files with 33 additions and 0 deletions

View File

@ -1,8 +1,19 @@
<?php
namespace api\modules\authserver\exceptions;
use ReflectionClass;
use yii\web\HttpException;
class AuthserverException extends HttpException {
/**
* Рефлексия быстрее, как ни странно:
* @url https://coderwall.com/p/cpxxxw/php-get-class-name-without-namespace#comment_19313
*
* @return string
*/
public function getName() {
return (new ReflectionClass($this))->getShortName();
}
}