Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux indy02.toastserver.com 3.10.0-962.3.2.lve1.5.85.el7.x86_64 #1 SMP Thu Apr 18 15:18:36 UTC 2024 x86_64
User : palandch ( 1163)
PHP Version : 7.1.33
Disable Function : NONE
Directory :  /home/palandch/www/core/model/modx/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/palandch/www/core/model/modx/modnamespace.class.php
<?php
/**
 * modNamespace
 *
 * @package modx
 */
/**
 * Represents a Component in the MODX framework. Isolates controllers, lexicons and other logic into the virtual
 * containment space defined by the path of the namespace.
 *
 * @property string $name The key of the namespace
 * @property string $path The absolute path of the namespace. May use {core_path}, {base_path} or {assets_path} as
 * placeholders for the path.
 *
 * @package modx
 */
class modNamespace extends xPDOObject {
    public function getCorePath() {
        $path = $this->get('path');
        return $this->xpdo->call('modNamespace','translatePath',array(&$this->xpdo,$path));
    }

    public function getAssetsPath() {
        $path = $this->get('assets_path');
        return $this->xpdo->call('modNamespace','translatePath',array(&$this->xpdo,$path));
    }

    public static function translatePath(xPDO &$xpdo,$path) {
        return str_replace(array(
            '{core_path}',
            '{base_path}',
            '{assets_path}',
        ),array(
            $xpdo->getOption('core_path',null,MODX_CORE_PATH),
            $xpdo->getOption('base_path',null,MODX_BASE_PATH),
            $xpdo->getOption('assets_path',null,MODX_ASSETS_PATH),
        ),$path);
    }
}

Spamworldpro Mini