Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
Dwstroy: Core

MODULE FOR 1C-BITRIX

DWSTROY

Dwstroy: Core

The Dwstroy: Core module is a utility component used in dwstroy projects. It contains basic classes and methods for working with arrays, outputting them to the console, and other utility tasks applied during project development and enhancement. The module is included via the command: \Bitrix\Main\Loader::includeModule('dwstroy.core').

Technical details

Published
27 September 2022
Updated
26 August 2026
Version
1.0.5
Installed
50–99 times
Compatible editions
Start, Standard, Small Business, Business
Responsive design
No
Composite support
No
Compatible with Sites24
No
Developer
DWSTROY

What this solution does

The Dwstroy: Core module is a utility component used in dwstroy projects. It contains basic classes and methods for working with arrays, outputting them to the console, and other utility tasks applied during project development and enhancement.

The module is included via the command: \Bitrix\Main\Loader::includeModule('dwstroy.core').

The DwsPrint class is designed for debugging and outputting arrays:

Dwstroy\Core\DwsPrint::PR($_SERVER) — simple array output;

Dwstroy\Core\DwsPrint::jsPR($_SERVER, 1, true) — array output in JavaScript format;

Dwstroy\Core\DwsPrint::DebugLog($_SERVER) — array output to the console;

Dwstroy\Core\DwsPrint::debugLogFail($arr, false, false) — array logging to a file.

The Helper class ensures correct pluralization of numbers:

Examples of calling \Dwstroy\Core\Helper::formatMessage with quantity parameters and word forms (for example, for the word 'tovar'): 0, 1, 2, 10.

To obtain the query class for Highload block data, use the method to get the class by entity name:

$className = \Dwstroy\Core\Highloadblock::getInstance()->getDataClass('ASiteSettings'). The argument passed is the name of the Highload block entity.

The Dwstroy: Core module provides tools for working with high-load blocks in the D7 environment. It enables retrieving data classes for high-load blocks by their identifier or by the database table name. Once the class is obtained, a list of records can be queried with filtering and sorting options, and the results can be processed. The class \Dwstroy\Core\UserFieldEnumTable is used to retrieve values from the list of user fields. The module also includes the \Dwstroy\Core\WebForm helper designed to simplify work with web forms.

General iT can connect “Dwstroy: Core”, install and configure the module, and make sure the integration works correctly.

UPDATE HISTORY

What’s new

1 releases
1.0.5 (26.08.2026)Latest update

Fixed critical PHP 8 errors

- All private methods (PrintVar, clearJson, clearResult) have been made static, eliminating fatal errors when called via self::.

Security improved

- JSON_HEX_* flags have been added to DebugLog to protect against XSS when inserting JSON into script tags.

- All strings output to HTML are escaped using htmlspecialchars().

Access logic adjusted

- In dumpToFile, the condition has been corrected: if $userId === null, access is granted only to administrators; otherwise, it is granted to administrators and the specified user.

- Added checks for $USER instanceof \CUser to prevent errors in CLI or when no user is present.

Code optimization

- Methods PrintVar, clearJson, and clearResult are now static, preventing the creation of unnecessary objects.

Path normalization in PR has been simplified.

- Added a check for the result of json_encode with error output in case of failure.

Readability and reliability improved

- Short PHP tags have been replaced.

- In clearResult, a check for is_string($key) has been added to avoid errors with numeric keys.

- Fixed file handling logic in dumpToFile (directory creation, writing in append mode if the file does not exist).

Added ability to display call location in DebugLog

- Introduced the $showLocation parameter (default false); when enabled, a separate message is output to the console containing the object {file: "...", line: N} — the file path and line number from which the function was called.

USER EXPERIENCE

Solution reviews

How does this solution work in a real project? Share your experience and help others choose.

Be the first to share your experience

There are no reviews of this solution on git.ru yet. Tell us what worked well and what could be improved.

Verified purchaseAdd a key if you wish. A verified review gets a badge, priority placement and more rating weight.

Open to every clientJust sign in to your account. A key is optional; all reviews are moderated.

YOUR EXPERIENCE MATTERS

Your review

YOUR PROJECT INFRASTRUCTURE

A home for your website

BEFORE YOU ORDER

Let’s go through the details.

Is installation free?
The solution itself is free. Installation, configuration and customisation services are agreed separately. A compatible platform and an appropriate platform licence are required.
How do I check compatibility?
Compare the supported editions and solution version in the technical details with your project. Before installing on a live website, we recommend making a backup and checking the solution in a test environment.
Can you help with implementation?
We can help install the module, check its settings and verify how it works in your project. Compatibility with other customisations and the scope of work are assessed before we begin.

GENERAL iT

Let’s discuss your project

Получатель: ООО «Дженерал Ай Ти Рус»

1C-BITRIX

Install solution

Enter a domain with or without https://. The installer will open in your website control panel in a new tab.

Solution screenshots

Solution screenshot