Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 2fb37d9

Browse files
committed
Добавлен примерный скелет
1 parent 802ba0e commit 2fb37d9

18 files changed

Lines changed: 286 additions & 1 deletion

File tree

assets/DebugBar/themes/dark/dark.css

Whitespace-only changes.

assets/DebugBar/themes/light/light.css

Whitespace-only changes.

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,10 @@
77
"email": "ggrachdev@yandex.ru"
88
}
99
],
10+
"autoload": {
11+
"psr-4": {
12+
"GGrach\\BitrixDebugger\\": "src/BitrixDebugger"
13+
}
14+
},
1015
"require": {}
1116
}

initializer.php

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,28 @@
11
<?php
22

3-
// Need include this file in init.php
3+
// Need include this file in init.php
4+
5+
use Bitrix\Main\Loader;
6+
7+
include 'inizializer_alias.php';
8+
9+
Loader::registerAutoLoadClasses(null, [
10+
"\Fred\GiftCard\Configuration\IblockConfiguration" => "/bitrix/php_interface/src/GiftCard/Configuration/IblockConfiguration.php",
11+
"\Fred\GiftCard\Configuration\OrderConfiguration" => "/bitrix/php_interface/src/GiftCard/Configuration/OrderConfiguration.php",
12+
"\Fred\GiftCard\Configuration\GiftCardConfiguration" => "/bitrix/php_interface/src/GiftCard/Configuration/GiftCardConfiguration.php",
13+
"\Fred\GiftCard\Configuration\SenderConfiguration" => "/bitrix/php_interface/src/GiftCard/Configuration/SenderConfiguration.php",
14+
"\Fred\GiftCard\Validation\GiftCardValidator" => "/bitrix/php_interface/src/GiftCard/Validation/GiftCardValidator.php",
15+
"\Fred\GiftCard\Repository\GiftCardsRepository" => "/bitrix/php_interface/src/GiftCard/Repository/GiftCardsRepository.php",
16+
"\Fred\GiftCard\Repository\GiftCardsSenderRepository" => "/bitrix/php_interface/src/GiftCard/Repository/GiftCardsSenderRepository.php",
17+
"\Fred\GiftCard\Order\GiftCardOrderManager" => "/bitrix/php_interface/src/GiftCard/Order/GiftCardOrderManager.php",
18+
"\Fred\GiftCard\Factory\GiftCardFactory" => "/bitrix/php_interface/src/GiftCard/Factory/GiftCardFactory.php",
19+
"\Fred\GiftCard\Factory\GiftCardQueueItemFactory" => "/bitrix/php_interface/src/GiftCard/Factory/GiftCardQueueItemFactory.php",
20+
"\Fred\GiftCard\Models\GiftCard" => "/bitrix/php_interface/src/GiftCard/Models/GiftCard.php",
21+
"\Fred\GiftCard\Models\GiftCardQueueItem" => "/bitrix/php_interface/src/GiftCard/Models/GiftCardQueueItem.php",
22+
"\Fred\GiftCard\Agents\GiftCardSendingAgent" => "/bitrix/php_interface/src/GiftCard/Agents/GiftCardSendingAgent.php",
23+
"\Fred\GiftCard\Utils\UserOrderCreatorUtil" => "/bitrix/php_interface/src/GiftCard/Utils/UserOrderCreatorUtil.php",
24+
"\Fred\GiftCard\Exception\CreateUserException" => "/bitrix/php_interface/src/GiftCard/Exception/CreateUserException.php",
25+
"\Fred\GiftCard\Senders\GiftCardsEmailSender" => "/bitrix/php_interface/src/GiftCard/Senders/GiftCardsEmailSender.php",
26+
"\Fred\GiftCard\Senders\GiftCardsSenderDistributor" => "/bitrix/php_interface/src/GiftCard/Senders/GiftCardsSenderDistributor.php",
27+
"\Fred\GiftCard\Senders\GiftCardsSmsSender" => "/bitrix/php_interface/src/GiftCard/Senders/GiftCardsSmsSender.php",
28+
]);

inizializer_alias.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+

src/BitrixDebugger/.gitkeep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
namespace GGrach\BitrixDebugger\Configurator;
4+
5+
/**
6+
* Description of DebugConfigurator
7+
*
8+
* @author ggrachdev
9+
*/
10+
class DebuggerConfigurator {
11+
12+
/**
13+
* Цветовая схема дебаг-бара
14+
*
15+
* @var string
16+
*/
17+
protected $colorTheme = 'dark';
18+
19+
public function getColorTheme(): type {
20+
return $this->theme;
21+
}
22+
23+
public function setColorTheme(string $theme): void {
24+
$this->theme = $theme;
25+
}
26+
27+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<?php
2+
3+
namespace GGrach\BitrixDebugger\Configurator;
4+
5+
/**
6+
* Description of DebugConfigurator
7+
*
8+
* @author ggrachdev
9+
*/
10+
class DebuggerConfigurator {
11+
12+
/**
13+
* Путь до лог файлов разного уровня
14+
*
15+
* @var string
16+
*/
17+
protected $logPaths = [
18+
'error' => null,
19+
'warning' => null,
20+
'success' => null,
21+
'notice' => null
22+
];
23+
24+
/**
25+
* Разделитель между записями в лог-файле
26+
*
27+
* @var string
28+
*/
29+
protected $logChunkDelimeter = "======\n";
30+
31+
public function setLogPath(string $logType, string $pathFile): self {
32+
if (\array_key_exists($logType, $this->getLogPaths())) {
33+
$this->logPaths[$logType] = $pathFile;
34+
}
35+
36+
return $this;
37+
}
38+
39+
/**
40+
* Получить пути всех-лог файлов
41+
*
42+
* @return type
43+
*/
44+
public function getLogPaths() {
45+
return $this->logPaths;
46+
}
47+
48+
public function getLogChunkDelimeter() {
49+
return $this->logChunkDelimeter;
50+
}
51+
52+
public function setLogChunkDelimeter(string $logChunkDelimeter): self {
53+
$this->logChunkDelimeter = $logChunkDelimeter;
54+
55+
return $this;
56+
}
57+
58+
public function addLogType(string $keyLog, string $pathLogFile): self {
59+
$this->logPaths[$keyLog] = $pathLogFile;
60+
61+
return $this;
62+
}
63+
64+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)