Files
BiveEngine/engine/Main/trait.paths.php
2025-12-24 19:19:01 +03:00

39 lines
968 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
// Работа с путями
defined('ROOT_DIR') || exit;
trait Path
{
// Получить директорию движка
public function get_engine_path(): string
{
$r = $this->get_root_dir();
return $r . "/" .ENGINE_DIR_NAME;
}
// Получить корневую директорию
function get_root_dir(): string
{
return ROOT_DIR;
}
// Получить директорию хранилища
function get_storage_dir(): string
{
return ROOT_DIR . SLASH . STORAGE_DIR_NAME;
}
// Получить директорию пользовательского контента
function get_playarea_dir(): string
{
return ROOT_DIR . SLASH . PLAYAREA_DIR_NAME;
}
// Получить директорию со скриптами
function get_scripts_dir(): string
{
return $this->get_playarea_dir() . SLASH . "scripts";
}
}