-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
187 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hleb\Main\Routes\Methods\Traits\Group; | ||
|
||
|
||
use Hleb\Route\Group\GroupNoDebug; | ||
|
||
trait GroupNoDebugTrait | ||
{ | ||
/** | ||
* Disables the debug panel output for group routes. | ||
* Only relevant in DEBUG mode. | ||
* The implication is that this is not a workaround, and under these conditions | ||
* there is really no need to display a debug panel, such as a GET request | ||
* to an API expecting a JSON response. | ||
* | ||
* Отключает вывод отладочной панели у маршрутов группы. | ||
* Актуально только в DEBUG-режиме. | ||
* Подразумевается, что это не временное решение, а в этих условиях действительно | ||
* не нужно выводить панель отладки, например, GET-запрос к API, ожидающий в ответ JSON. | ||
*/ | ||
public function noDebug(): GroupNoDebug | ||
{ | ||
return new GroupNoDebug(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hleb\Main\Routes\Methods\Traits; | ||
|
||
use Hleb\Route\NoDebug; | ||
|
||
trait InsertNoDebugTrait | ||
{ | ||
/** | ||
* Applies the specified protection to the route. | ||
* Only relevant in DEBUG mode. | ||
* The implication is that this is not a workaround, and under these conditions | ||
* there is really no need to display a debug panel, such as a GET request | ||
* to an API expecting a JSON response. | ||
* | ||
* Отключает вывод отладочной панели у маршрута. | ||
* Актуально только в DEBUG-режиме. | ||
* Подразумевается, что это не временное решение, а в этих условиях действительно | ||
* не нужно выводить панель отладки, например, GET-запрос к API, ожидающий в ответ JSON. | ||
*/ | ||
public function noDebug(): NoDebug | ||
{ | ||
return new NoDebug(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hleb\Route\Group; | ||
|
||
use Hleb\Main\Routes\Methods\Traits\Group\StandardGroupTrait; | ||
use Hleb\Main\Routes\StandardRoute; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class GroupNoDebug extends StandardRoute | ||
{ | ||
use StandardGroupTrait; | ||
|
||
public function __construct() | ||
{ | ||
$this->register([ | ||
'method' => self::NO_DEBUG_TYPE, | ||
'from-group' => true, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Hleb\Route; | ||
|
||
use Hleb\Main\Routes\Methods\Traits\InsertAfterTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertBeforeTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertControllerTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertDomainTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertMiddlewareTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertModuleTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertNameTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertPageTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertProtectTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertRedirectTrait; | ||
use Hleb\Main\Routes\Methods\Traits\InsertWhereTrait; | ||
use Hleb\Main\Routes\StandardRoute; | ||
|
||
/** | ||
* @internal | ||
*/ | ||
final class NoDebug extends StandardRoute | ||
{ | ||
use InsertWhereTrait; | ||
use InsertControllerTrait; | ||
use InsertMiddlewareTrait; | ||
use InsertAfterTrait; | ||
use InsertBeforeTrait; | ||
use InsertNameTrait; | ||
use InsertProtectTrait; | ||
use InsertModuleTrait; | ||
use InsertDomainTrait; | ||
use InsertPageTrait; | ||
use InsertRedirectTrait; | ||
|
||
public function __construct() | ||
{ | ||
$this->register([ | ||
'method' => self::NO_DEBUG_TYPE, | ||
'from-group' => false, | ||
]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters