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


PHP Get::closestFolders方法代码示例

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


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

示例1: function

        include __DIR__ . DS . 'task.ignite.package.php';
        if (!Notify::errors()) {
            File::upload($_FILES['file'], $destination, function () use($speak) {
                Notify::clear();
                Notify::success(Config::speak('notify_success_uploaded', $speak->shield));
            });
            $P = array('data' => $_FILES);
            Weapon::fire(array('on_shield_update', 'on_shield_construct'), array($P, $P));
            $segment = 'shield/' . $path;
            include __DIR__ . DS . 'task.package.php';
        } else {
            $tab_id = 'tab-content-2';
            include __DIR__ . DS . 'task.js.tab.php';
        }
    }
    $folders = Get::closestFolders($destination, 'ASC', null, 'key:path');
    Config::set(array('page_title' => $speak->shields . $config->title_separator . $config->manager->title, 'page' => Shield::info($folder, true), 'cargo' => 'cargo.shield.php'));
    Shield::lot(array('segment' => 'shield', 'folder' => $folder, 'folders' => $folders, 'files' => Mecha::O(Get::files($destination . DS . $folder, SCRIPT_EXT, 'ASC', 'path'))))->attach('manager');
});
/**
 * Shield Repairer/Igniter
 * -----------------------
 */
Route::accept(array($config->manager->slug . '/shield/(:any)/ignite', $config->manager->slug . '/shield/(:any)/repair/file:(:all)'), function ($folder = false, $file = false) use($config, $speak) {
    if (!Guardian::happy(1)) {
        Shield::abort();
    }
    if (!($_folder = Shield::exist($folder))) {
        Shield::abort();
        // Folder not found!
    }
开发者ID:yiannisSt,项目名称:mecha-cms,代码行数:31,代码来源:route.shield.php

示例2: md5

                        Weapon::fire(array('on_plugin_mount', 'on_plugin_' . md5($path) . '_mount'), array($P, $P));
                        Guardian::kick($config->manager->slug . '/plugin/' . $path);
                        // Redirect to the plugin manager page
                    } else {
                        Guardian::kick($config->manager->slug . '/plugin?q=' . $path);
                    }
                }
            }
        } else {
            $tab_id = 'tab-content-2';
            include __DIR__ . DS . 'task.js.tab.php';
        }
    }
    $filter = Request::get('q', "");
    $filter = $filter ? Text::parse($filter, '->safe_file_name') : "";
    $s = Get::closestFolders($destination, 'ASC', 'path', $filter);
    if (!($folders = Mecha::eat($s)->chunk($offset, $config->manager->per_page)->vomit())) {
        Shield::abort();
    }
    Config::set(array('page_title' => $speak->plugins . $config->title_separator . $config->manager->title, 'offset' => $offset, 'pagination' => Navigator::extract($s, $offset, $config->manager->per_page, $config->manager->slug . '/plugin'), 'cargo' => 'cargo.plugin.php'));
    Shield::lot(array('segment' => 'plugin', 'folders' => Mecha::O($folders)))->attach('manager');
});
/**
 * Plugin Configurator
 * -------------------
 */
Route::accept($config->manager->slug . '/plugin/(:any)', function ($slug = 1) use($config, $speak) {
    if (is_numeric($slug)) {
        // It's an index page
        Route::execute($config->manager->slug . '/plugin/(:num)', array($slug));
    }
开发者ID:AdeHaze,项目名称:mecha-cms,代码行数:31,代码来源:route.plugin.php


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