本文整理汇总了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!
}
示例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));
}