Объяснение структуры каталогов 2 | Participants
|
- Statistics
- Participants
- Translate into Russian
- Translation result
- 75% translated in draft. Almost done, let's finish it!
If you do not want to register an account, you can sign in with OpenID.
Explanation of Directory Structure 2 | ||
The root directory of MODx is split into several subdirectories, each with its own set of responsibilities and tasks. Some of these directories can be renamed and moved, and their locations can be configured during setup. | Корневой каталог MODx разбит на несколько подкаталогов, каждый со своими целями и задачами. Некоторые из этих каталогов могут быть переименованы и перемещены, и их размещение может быть настроено в процессе установки. | |
connectors/ | ||
Connectors are essentially entry points for AJAX requests in MODx. They don't do any database manipulation on their own; they simply load up the main MODx class, sanitize any request data, and then handle the request by pointing to the appropriate Processor file. | Коннекторы (connector) в MODx являются точками входа для AJAX-запросов. Сами по себе они не выполняют никаких манипуляций в базе данных; они просто загружают главный класс MODx, приводят к безопасному виду данные запроса, а затем обрабатывают запрос, указывая на подходящий файл обработчика (processor). | |
For example, when we create a resource, we request connectors/resource/index.php?action=create. The index.php file will include the base connector file (connectors/index.php) which instantiates the main MODx object, handle any custom Context switching, and sanitize the GET or POST request. The connectors/resource/index.php will then "handle" the request and call the correct Processor file, which we will discuss later. | К примеру, когда мы создаем ресурс, мы запрашиваем connectors/resource/index.php?action=create. Файл index.php подключит базовый файл коннектора (connectors/index.php), который создаст экземпляр главного объекта MODx, позаботится о необходимых переключениях контекста, и приведет к безопасному виду GET или POST запрос. Затем connectors/resource/index.php "обработает" запрос и вызовет правильной файл обработчика, что мы обсудим ниже. | |
Notable Files | ||
* connectors/index.php - This file is particularly useful in creating your own connectors. Simply include this file in your connectors, and then handle the request using $modx->request->handleRequest(); | * connectors/index.php - Этот файл является особенно полезным в создании собственных коннекторов. Просто включите этот файл в Ваш коннектор, а затем обработайте запрос, используя вызов $modx->request->handleRequest(); | |
core/ | ||
The Core is what makes MODx, MODx. It is the base for all the libraries for Revolution. Most everything you need, with the exception of the manager files and the setup files, are in this directory. | Ядро - то, что делает MODx, MODx. Это - ядро для всех библиотек "Революции". Все, в чем Вы больше всего нуждаетесь, за исключением файлов менеджера и файлов установки, находится в этом каталоге. | |
core/cache/ | ||
The cache directory contains all of the cache files generated by MODx. Lexicons, elements, resources, RSS, and Smarty data are generated on-demand by MODx, meaning that they are only cached after being accessed for the first time. | Кэш-директория содержит все кэш-файлы, создаваемые MODx. Словари, элементы, ресурсы, rss, и smarty данных генерируются по требованию MODx, а это означает, что они кэшируются после того, как были вызваны в первый раз. | |
core/cache/logs/ | ||
All file logging in MODx is done here. You will find the error.log file here, which contains the date, time, file, and error which was logged by MODx. | Все файлы логирования в MODx создаются здесь. Вы найдете здесь error.log файл, который содержит дату, время, файл, и ошибки, которые были зарегистрированы в MODx. | |
To log an entry to this file, you can use the $modx->log() method. | Чтобы сделать лог-запись в этот файл, вы можете использовать $modx->log() метод. | |
core/cache/mgr/ | ||
This directory contains cache data for the mgr (Manager) context. Like every context cache, it will cache any context settings that have been overridden from their default System Settings. | Этот каталог содержит данные кэша для mgr (Менеджер) контекст. Как любой контекстный кэш, будут кэшироваться любые контекстные параметры настройки, которые были переопределены от их заданных по умолчанию Системных Параметров. |
