当前位置: 首页>>代码示例>>PHP>>正文


PHP rex_path::data方法代码示例

本文整理汇总了PHP中rex_path::data方法的典型用法代码示例。如果您正苦于以下问题:PHP rex_path::data方法的具体用法?PHP rex_path::data怎么用?PHP rex_path::data使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在rex_path的用法示例。


在下文中一共展示了rex_path::data方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkFilesystem

 /**
  * checks permissions of all required filesystem resources.
  *
  * @return array An array of error messages
  */
 public static function checkFilesystem()
 {
     // -------------------------- SCHREIBRECHTE
     $writables = [rex_path::media(), rex_path::assets(), rex_path::cache(), rex_path::data(), rex_path::src()];
     $func = function ($dir) use(&$func) {
         if (!rex_dir::isWritable($dir)) {
             return ['setup_304' => [$dir]];
         }
         $res = [];
         foreach (rex_finder::factory($dir) as $path => $file) {
             if ($file->isDir()) {
                 $res = array_merge_recursive($res, $func($path));
             } elseif (!$file->isWritable()) {
                 $res['setup_305'][] = $path;
             }
         }
         return $res;
     };
     $res = [];
     foreach ($writables as $dir) {
         if (@is_dir($dir)) {
             $res = array_merge_recursive($res, $func($dir));
         } else {
             $res['setup_306'][] = $dir;
         }
     }
     return $res;
 }
开发者ID:VIEWSION,项目名称:redaxo,代码行数:33,代码来源:setup.php

示例2: header

    // echo nl2br(htmlspecialchars($cont));
    if (rex_file::putConfig($configFile, $config) !== false) {
        $info = rex_i18n::msg('setup_error1', '<a href="' . rex_url::backendController() . '">', '</a>');
        header('Location:' . rex_url::backendController());
        exit;
    } else {
        $error[] = rex_i18n::msg('setup_error2');
    }
} elseif ($func == 'generate') {
    // generate all articles,cats,templates,caches
    $success = rex_delete_cache();
} elseif ($func == 'updateassets') {
    rex_dir::copy(rex_path::core('assets'), rex_path::assets());
    $success = 'Updated assets';
} elseif ($func == 'updateinfos') {
    $configFile = rex_path::data('config.yml');
    $config = array_merge(rex_file::getConfig(rex_path::core('default.config.yml')), rex_file::getConfig($configFile));
    $settings = rex_post('settings', 'array', []);
    foreach (['server', 'servername', 'error_email', 'lang'] as $key) {
        if (!isset($settings[$key]) || !$settings[$key]) {
            $error[] = rex_i18n::msg($key . '_required');
            continue;
        }
        $config[$key] = $settings[$key];
        try {
            rex::setProperty($key, $settings[$key]);
        } catch (InvalidArgumentException $e) {
            $error[] = rex_i18n::msg($key . '_invalid');
        }
    }
    $config['debug'] = isset($settings['debug']) && $settings['debug'];
开发者ID:staabm,项目名称:redaxo,代码行数:31,代码来源:system.settings.php

示例3: function

<?php

if (rex_string::versionCompare(rex::getVersion(), '5.0.0-beta1', '<=')) {
    rex_extension::register('RESPONSE_SHUTDOWN', function () {
        rex_file::delete(rex_path::assets('jquery.min.js'));
        rex_file::delete(rex_path::assets('jquery.min.map'));
        rex_file::delete(rex_path::assets('jquery-pjax.min.js'));
        rex_file::delete(rex_path::assets('jquery-ui.custom.min.js'));
        rex_file::delete(rex_path::assets('jquery-ui.custom.txt'));
        rex_file::delete(rex_path::assets('redaxo-logo.svg'));
        rex_file::delete(rex_path::assets('sha1.js'));
        rex_file::delete(rex_path::assets('standard.js'));
    });
    rex_dir::copy(__DIR__ . '/assets', rex_path::assets('core'));
    rex_dir::create(rex_path::data('core'));
    rename(rex_path::data('config.yml'), rex_path::data('core/config.yml'));
}
开发者ID:VIEWSION,项目名称:redaxo,代码行数:17,代码来源:update.php

示例4: testCheckConnectionInvalidDatabase

 public function testCheckConnectionInvalidDatabase()
 {
     $configFile = rex_path::data('config.yml');
     $config = rex_file::getConfig($configFile);
     $this->assertTrue(true !== rex_sql::checkDbConnection($config['db'][1]['host'], $config['db'][1]['login'], $config['db'][1]['password'], 'fu-database'));
 }
开发者ID:staabm,项目名称:redaxo,代码行数:6,代码来源:sql_test.php


注:本文中的rex_path::data方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。