本文整理汇总了PHP中find_files函数的典型用法代码示例。如果您正苦于以下问题:PHP find_files函数的具体用法?PHP find_files怎么用?PHP find_files使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了find_files函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
echo "search class files...";
$files = find_files($this->_source_dir, array('extnames' => array('.php'), 'excludes' => array('_config')));
echo "ok\n\n";
$this->_files = $files;
spl_autoload_register(array($this, 'autoload'));
$classes = get_declared_classes();
$classes = array_merge($classes, get_declared_interfaces());
foreach ($files as $path) {
require_once $path;
}
$new_classes = get_declared_classes();
$new_classes = array_merge($new_classes, get_declared_interfaces());
$found = array_diff($new_classes, $classes);
$files = array();
foreach ($found as $class) {
$r = new ReflectionClass($class);
$files[$class] = $r->getFileName();
}
$arr = array();
$len = strlen($this->_source_dir);
foreach ($files as $class => $path) {
$filename = str_replace(array('/', '\\'), '/', substr($path, $len + 1));
$class = strtolower($class);
$arr[$class] = $filename;
}
$output = "<?php global \$G_CLASS_FILES;\$G_CLASS_FILES = ";
$output .= str_replace(array(' ', "\n"), '', var_export($arr, true));
$output .= ";\n";
file_put_contents($this->_output_file, $output, LOCK_EX);
echo "ok\n";
}
开发者ID:Debenson,项目名称:openwan,代码行数:33,代码来源:loadclass.php
示例2: find_files
function find_files($path, $pattern)
{
$path = rtrim(str_replace("\\", "/", $path), '/') . '/';
$entries = array();
$matches = array();
$dir = dir($path);
while (false !== ($entry = $dir->read())) {
$entries[] = $entry;
}
$dir->close();
foreach ($entries as $entry) {
$fullname = $path . $entry;
if ($entry != '.' && $entry != '..' && is_dir($fullname)) {
$merge = array_merge($matches, find_files($fullname, $pattern));
foreach ($merge as $m) {
array_push($matches, $m);
}
} else {
if (is_file($fullname) && preg_match($pattern, $fullname)) {
array_push($matches, $fullname);
}
}
}
return array_unique($matches);
}
开发者ID:JiffSoft,项目名称:FacePress,代码行数:25,代码来源:functions.php
示例3: find_files
function find_files($path, $pattern, $callback)
{
$path = rtrim(str_replace("\\", "/", $path), '/') . '/*';
foreach (glob($path) as $fullname) {
if (is_dir($fullname)) {
find_files($fullname, $pattern, $callback);
} else {
if (preg_match($pattern, $fullname)) {
$fullname = str_replace('bin/', '', $fullname);
call_user_func($callback, $fullname);
}
}
}
}
开发者ID:Hatscat,项目名称:Doge_Tycoon,代码行数:14,代码来源:filereader.php
示例4: installed
/**
* Indexes the install module files
*
* @since 1.1
*
* @return void
**/
function installed () {
if (!is_dir($this->path)) return false;
$path = $this->path;
$files = array();
find_files(".php",$path,$path,$files);
if (empty($files)) return $files;
foreach ($files as $file) {
// Skip if the file can't be read or isn't a real file at all
if (!is_readable($path.$file) && !is_dir($path.$file)) continue;
// Add the module file to the registry
$module = new ModuleFile($path,$file);
if ($module->addon) $this->modules[$module->subpackage] = $module;
else $this->legacy[] = md5_file($path.$file);
}
}
开发者ID:robbiespire,项目名称:paQui,代码行数:25,代码来源:Modules.php
示例5: scanmodules
function scanmodules($path = false)
{
global $Shopp;
if (!$path) {
$path = $this->path;
}
$modfilescan = array();
find_files(".php", $path, $path, $modfilescan);
if (empty($modfilescan)) {
return $modfilescan;
}
foreach ($modfilescan as $file) {
if (!is_readable($path . $file)) {
continue;
}
$ShipCalcClass = substr(basename($file), 0, -4);
$modfiles[$ShipCalcClass] = $file;
}
$Shopp->Settings->save('shipcalc_modules', addslashes(serialize($modfiles)));
$Shopp->Settings->save('shipcalc_lastscan', mktime());
return $modfiles;
}
开发者ID:kennethreitz-archive,项目名称:wordpress-skeleton,代码行数:22,代码来源:ShipCalcs.php
示例6: find_files_with_dir
function find_files_with_dir($dir, &$dir_array)
{
// Create array of current directory
$files = scandir($dir);
if (is_array($files)) {
foreach ($files as $val) {
// Skip home and previous listings
if ($val == '.' || $val == '..') {
continue;
}
// If directory then dive deeper, else add file to directory key
if (is_dir($dir . '/' . $val)) {
// Add value to current array, dir or file
$dir_array[$dir][] = $val;
find_files($dir . '/' . $val, $dir_array);
} else {
$dir_array[$dir][] = $val;
}
}
}
ksort($dir_array);
}
开发者ID:Methunter,项目名称:agency,代码行数:22,代码来源:functions.php
示例7: find_files
function find_files($base, $needle, $function, $userdata = NULL, $depth = 1)
{
// Do not set $depth by hand! It is used for internal depth checking only!
$dir = dir($base);
while ($file = $dir->read()) {
if ($file != "." && $file != "..") {
$path = sprintf("%s/%s", $base, $file);
if (is_dir($path)) {
find_files($path, $needle, $function, $userdata, $depth + 1);
} else {
if (preg_match($needle, $file)) {
if (empty($userdata)) {
$function($path, $file);
} else {
$function($path, $file, $userdata);
}
}
}
}
}
$dir->close();
}
开发者ID:amcgregor,项目名称:resumewriter,代码行数:22,代码来源:template.php
示例8: find_files
function find_files($path, $pattern, $callback)
{
global $texts;
global $xml;
$path = rtrim(str_replace("\\", "/", $path), '/') . '/';
$matches = array();
$entries = array();
$dir = dir($path);
while (false !== ($entry = $dir->read())) {
$entries[] = $entry;
}
$dir->close();
foreach ($entries as $entry) {
$fullname = $path . $entry;
if ($entry != '.' && $entry != '..' && is_dir($fullname)) {
find_files($fullname, $pattern, $callback);
} else {
if (is_file($fullname) && preg_match($pattern, $entry)) {
call_user_func($callback, $fullname);
}
}
}
}
开发者ID:deanzhang,项目名称:freeswitch-sounds-tts,代码行数:23,代码来源:xml_write.php
示例9: testFindFiles
public function testFindFiles()
{
$this->createTempFiles();
$path = $this->path;
$filesFound = find_files($path, 0, '*');
$this->assertSame(7, count($filesFound));
$jsFilesFound = find_js_files($path);
$this->assertSame(2, count($jsFilesFound));
$htmlFilesFound = find_html_files($path);
$this->assertSame(2, count($htmlFilesFound));
$phpFilesFound = find_php_files($path);
$this->assertSame(2, count($phpFilesFound));
// Including subdirectories
$filesFound = find_files($path, 0, '*', true);
$this->assertSame(10, count($filesFound));
$jsFilesFound = find_js_files($path, true);
$this->assertSame(3, count($jsFilesFound));
$htmlFilesFound = find_html_files($path, true);
$this->assertSame(3, count($htmlFilesFound));
$phpFilesFound = find_php_files($path, true);
$this->assertSame(3, count($phpFilesFound));
$this->assertInternalType('array', find_templates());
$this->removeTempFiles();
}
开发者ID:YounessTayer,项目名称:directus,代码行数:24,代码来源:functionsTest.php
示例10: copy_content
/**
* Moves files or complete directories
*
* @param $from string Can be a file or a directory. Will move either the file or all files within the directory
* @param $to string Where to move the file(s) to. If not specified then will get moved to the root folder
* @param $strip Used for FTP only
* @return mixed: Bool true on success, error string on failure, NULL if no action was taken
*
* NOTE: function should preferably not return in case of failure on only one file.
* The current method makes error handling difficult
*/
function copy_content($from, $to = '', $strip = '')
{
global $phpbb_root_path, $user;
if (strpos($from, $phpbb_root_path) !== 0) {
$from = $phpbb_root_path . $from;
}
// When installing a MODX 1.2.0 MOD, this happens once in a long while.
// Not sure why yet.
if (is_array($to)) {
return NULL;
}
if (strpos($to, $phpbb_root_path) !== 0) {
$to = $phpbb_root_path . $to;
}
$files = array();
if (is_dir($from)) {
// get all of the files within the directory
$files = find_files($from, '.*');
} else {
if (is_file($from)) {
$files = array($from);
}
}
if (empty($files)) {
return false;
}
// ftp
foreach ($files as $file) {
if (is_dir($to)) {
$to_file = str_replace(array($phpbb_root_path, $strip), '', $file);
} else {
$to_file = str_replace($phpbb_root_path, '', $to);
}
$this->recursive_mkdir(dirname($to_file));
if (!$this->transfer->overwrite_file($file, $to_file)) {
// may as well return ... the MOD is likely dependent upon
// the file that is being copied
return sprintf($user->lang['MODS_FTP_FAILURE'], $to_file);
}
}
return true;
}
开发者ID:Oddsor,项目名称:lpt-forum,代码行数:53,代码来源:editor.php
示例11: find_files
/**
* List files matching specified PCRE pattern.
*
* @access public
* @param string Relative or absolute path to the directory to be scanned.
* @param string Search pattern (perl compatible regular expression).
* @param integer Number of subdirectory levels to scan (set to 1 to scan only current).
* @param integer This one is used internally to control recursion level.
* @return array List of all files found matching the specified pattern.
*/
function find_files($directory, $pattern, $max_levels = 20, $_current_level = 1)
{
if ($_current_level <= 1) {
if (strpos($directory, '\\') !== false) {
$directory = str_replace('\\', '/', $directory);
}
if (empty($directory)) {
$directory = './';
} else {
if (substr($directory, -1) != '/') {
$directory .= '/';
}
}
}
$files = array();
$subdir = array();
if (is_dir($directory)) {
$handle = @opendir($directory);
while (($file = @readdir($handle)) !== false) {
if ($file == '.' || $file == '..') {
continue;
}
$fullname = $directory . $file;
if (is_dir($fullname)) {
if ($_current_level < $max_levels) {
$subdir = array_merge($subdir, find_files($fullname . '/', $pattern, $max_levels, $_current_level + 1));
}
} else {
if (preg_match('/^' . $pattern . '$/i', $file)) {
$files[] = $fullname;
}
}
}
@closedir($handle);
sort($files);
}
return array_merge($files, $subdir);
}
开发者ID:Oddsor,项目名称:lpt-forum,代码行数:48,代码来源:functions_mods.php
示例12: recursive_unlink
/**
* Recursively delete a directory
*
* @param string $path (required) Directory path to recursively delete
* @author jasmineaura
*/
function recursive_unlink($path)
{
global $phpbb_root_path, $phpEx, $user;
// Insurance - this should never really happen
if ($path == $phpbb_root_path || is_file("{$path}/common.{$phpEx}")) {
return false;
}
// Get all of the files in the source directory
$files = find_files($path, '.*');
// Get all of the sub-directories in the source directory
$subdirs = find_files($path, '.*', 20, true);
// Delete all the files
foreach ($files as $file) {
if (!unlink($file)) {
return sprintf($user->lang['MODS_RMFILE_FAILURE'], $file);
}
}
// Delete all the sub-directories, in _reverse_ order (array_pop)
for ($i = 0, $cnt = count($subdirs); $i < $cnt; $i++) {
$subdir = array_pop($subdirs);
if (!rmdir($subdir)) {
return sprintf($user->lang['MODS_RMDIR_FAILURE'], $subdir);
}
}
// Finally, delete the directory itself
if (!rmdir($path)) {
return sprintf($user->lang['MODS_RMDIR_FAILURE'], $path);
}
return true;
}
开发者ID:danielgospodinow,项目名称:GamingZone,代码行数:36,代码来源:functions_mods.php
示例13: find_files
function find_files($dir, $is_ext_dir = FALSE, $ignore = FALSE)
{
global $test_files, $exts_to_test, $ignored_by_ext, $exts_skipped, $exts_tested;
$o = opendir($dir) or error("cannot open directory: {$dir}");
while (($name = readdir($o)) !== FALSE) {
if (is_dir("{$dir}/{$name}") && !in_array($name, array('.', '..', 'CVS'))) {
$skip_ext = $is_ext_dir && !in_array($name, $exts_to_test);
if ($skip_ext) {
$exts_skipped++;
}
find_files("{$dir}/{$name}", FALSE, $ignore || $skip_ext);
}
// Cleanup any left-over tmp files from last run.
if (substr($name, -4) == '.tmp') {
@unlink("{$dir}/{$name}");
continue;
}
// Otherwise we're only interested in *.phpt files.
if (substr($name, -5) == '.phpt') {
if ($ignore) {
$ignored_by_ext++;
} else {
$testfile = realpath("{$dir}/{$name}");
$test_files[] = $testfile;
}
}
}
closedir($o);
}
开发者ID:jenalgit,项目名称:roadsend-php,代码行数:29,代码来源:run-tests.php
示例14: run_test
//.........这里部分代码省略.........
if (isset($old_php)) {
$php = $old_php;
}
if (!$cfg['keep']['skip']) {
@unlink($test_skipif);
}
return 'SKIPPED';
}
if (!strncasecmp('info', ltrim($output), 4)) {
if (preg_match('/^\\s*info\\s*(.+)\\s*/i', $output, $m)) {
$info = " (info: {$m['1']})";
}
}
if (!strncasecmp('warn', ltrim($output), 4)) {
if (preg_match('/^\\s*warn\\s*(.+)\\s*/i', $output, $m)) {
$warn = true;
/* only if there is a reason */
$info = " (warn: {$m['1']})";
}
}
}
}
if (@count($section_text['REDIRECTTEST']) == 1) {
$test_files = array();
$IN_REDIRECT = eval($section_text['REDIRECTTEST']);
$IN_REDIRECT['via'] = "via [{$shortname}]\n\t";
$IN_REDIRECT['dir'] = realpath(dirname($file));
$IN_REDIRECT['prefix'] = trim($section_text['TEST']);
if (count($IN_REDIRECT['TESTS']) == 1) {
if (is_array($org_file)) {
$test_files[] = $org_file[1];
} else {
$GLOBALS['test_files'] = $test_files;
find_files($IN_REDIRECT['TESTS']);
foreach ($GLOBALS['test_files'] as $f) {
$test_files[] = array($f, $file);
}
}
$test_cnt += @count($test_files) - 1;
$test_idx--;
show_redirect_start($IN_REDIRECT['TESTS'], $tested, $tested_file);
// set up environment
$redirenv = array_merge($environment, $IN_REDIRECT['ENV']);
$redirenv['REDIR_TEST_DIR'] = realpath($IN_REDIRECT['TESTS']) . DIRECTORY_SEPARATOR;
usort($test_files, "test_sort");
run_all_tests($test_files, $redirenv, $tested);
show_redirect_ends($IN_REDIRECT['TESTS'], $tested, $tested_file);
// a redirected test never fails
$IN_REDIRECT = false;
return 'REDIR';
} else {
$bork_info = "Redirect info must contain exactly one TEST string to be used as redirect directory.";
show_result("BORK", $bork_info, '', $temp_filenames);
$PHP_FAILED_TESTS['BORKED'][] = array('name' => $file, 'test_name' => '', 'output' => '', 'diff' => '', 'info' => "{$bork_info} [{$file}]");
}
}
if (is_array($org_file) || @count($section_text['REDIRECTTEST']) == 1) {
if (is_array($org_file)) {
$file = $org_file[0];
}
$bork_info = "Redirected test did not contain redirection info";
show_result("BORK", $bork_info, '', $temp_filenames);
$PHP_FAILED_TESTS['BORKED'][] = array('name' => $file, 'test_name' => '', 'output' => '', 'diff' => '', 'info' => "{$bork_info} [{$file}]");
return 'BORKED';
}
// We've satisfied the preconditions - run the test!
开发者ID:wgy0323,项目名称:ffmpeg-php,代码行数:67,代码来源:run-tests.php
示例15: copy_content
function copy_content($from, $to = '', $strip = '')
{
global $phpbb_root_path, $user;
if (strpos($from, $phpbb_root_path) !== 0) {
$from = $phpbb_root_path . $from;
}
if (strpos($to, $phpbb_root_path) !== 0) {
$to = $phpbb_root_path . $to;
}
// Note: phpBB's compression class does support adding a whole directory at a time.
// However, I chose not to use that function because it would not allow AutoMOD's
// error handling to work the same as for FTP & Direct methods.
$files = array();
if (is_dir($from)) {
// get all of the files within the directory
$files = find_files($from, '.*');
} else {
if (is_file($from)) {
$files = array($from);
}
}
if (empty($files)) {
return false;
}
foreach ($files as $file) {
if (is_dir($to)) {
// this would find the directory part specified in MODX
$to_file = str_replace(array($phpbb_root_path, $strip), '', $to);
// and this fetches any subdirectories and the filename of the destination file
$to_file .= substr($file, strpos($file, $to_file) + strlen($to_file));
} else {
$to_file = str_replace($phpbb_root_path, '', $to);
}
// filename calculation is involved here:
// and prepend the "files" directory
if (!$this->compress->add_custom_file($file, 'files/' . $to_file)) {
return sprintf($user->lang['WRITE_MANUAL_FAIL'], $to_file);
}
}
// return true since we are now taking an action - NULL implies no action
return true;
}
开发者ID:kairion,项目名称:customisation-db,代码行数:42,代码来源:editor.php
示例16: find_files
function find_files($dirname, $ext, $file_list = array())
{
global $file_list;
// Loop through the folder
$dir = dir($dirname);
while (false !== ($entry = $dir->read())) {
// Skip pointers
if ($entry == '.' || $entry == '..') {
continue;
}
// Deep find directories
if (is_dir($dirname . DS . $entry)) {
find_files($dirname . DS . $entry, $ext, $file_list);
} else {
foreach ($ext as $key => $value) {
if (substr($entry, -$value) == $key) {
$file_list[] = $dirname . DS . $entry;
}
}
}
}
// Clean up
$dir->close();
return $file_list;
}
开发者ID:shaunfreeman,项目名称:Uthando-CMS,代码行数:25,代码来源:functions.php
示例17: catch
$file->close();
} catch (IOException $e) {
error($e->getMessage() . ' "' . $file->getFilepath() . '"');
}
}
$shell =& new RuntimeContext(new ShellContext());
$paramsHastable =& $shell->getParams();
if ($paramsHastable->size() != 2 || '--help' == $paramsHastable->get(1)) {
help();
} else {
$path = $paramsHastable->get(1);
if (!SysDirectory::exists($path)) {
error('Le répertoire ' . $path . ' est inaccessible !');
} else {
$files =& new Queue();
find_files($path, $files);
if (0 == $files->size()) {
error('Aucun fichier php a scanner');
} else {
$shell->set('scan_results', new Queue());
$iterator =& $files->getIterator();
while ($iterator->hasNext()) {
$entry =& $iterator->next();
scan_file($entry, $shell);
}
unset($files);
$iterator =& $shell->get('scan_results')->getIterator();
while ($iterator->hasNext()) {
$filepath = System::find_class_filepath($iterator->next());
scan_file(new SysFile($filepath), $shell);
}
开发者ID:gotnospirit,项目名称:php-dpat,代码行数:31,代码来源:xt_scan_project.php
示例18: evaleval
?>
?search=@php_uname" title="Tìm @php_uname"><font color="#00EE00">@php_uname</a></font>
<!--
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?search=eval(gzinflate(base64_decode(" title="Tìm evaleval(gzinflate(base64_decode("><font color="00EE00">eval(gzinflate(base64_decode(</a></font> ||
<a href="<?php
echo $_SERVER['PHP_SELF'];
?>
?search=/etc/passwd" title="Tìm /etc/passwd/"><font color="$00EE00">/etc/passwd</a></font> ||
-->
</div><hr/><div style="font: normal 12px/2.4em Menlo, 'Andale Mono', 'Courier New', sans-serif;"><?php
error_reporting(NULL);
header("Content-Type: text/html; charset=utf-8");
find_files('.');
function find_files($seed)
{
if (!is_dir($seed)) {
return false;
}
$files = array();
$dirs = array($seed);
while (NULL !== ($dir = array_pop($dirs))) {
if ($dh = opendir($dir)) {
while (false !== ($file = readdir($dh))) {
if ($file == '.' || $file == '..') {
continue;
}
$path = $dir . '/' . $file;
if (is_dir($path)) {
开发者ID:danglx,项目名称:db-auto-nvht,代码行数:31,代码来源:scan.php
示例19: process_edits
//.........这里部分代码省略.........
// Delete (or reverse-delete) installed files
if (!empty($actions['DELETE_FILES'])) {
$template->assign_var('S_REMOVING_FILES', true);
// Dealing with a reverse-delete, must heed to the dangers ahead!
if ($reverse) {
$directories = array();
$directories['src'] = array();
$directories['dst'] = array();
$directories['del'] = array();
// Because foreach operates on a copy of the specified array and not the array itself,
// we cannot rely on the array pointer while using it, so we use a while loop w/ each()
// We need array pointer to rewind the loop when is_array($target) (See Ticket #62341)
while (list($source, $target) = each($actions['DELETE_FILES'])) {
if (is_array($target)) {
// If we've shifted off all targets, we're done w/ that element
if (empty($target)) {
continue;
}
// Shift off first target, then rewind array pointer to get next target
$target = array_shift($actions['DELETE_FILES'][$source]);
prev($actions['DELETE_FILES']);
}
// Some MODs include 'umil/', avoid deleting!
if (strpos($target, 'umil/') === 0) {
unset($actions['DELETE_FILES'][$source]);
continue;
} else {
if (strpos($source, '*.*') !== false) {
// This could be phpbb_root_path, if "Copy: root/*.* to: *.*" syntax was used
// or root/custom_dir if "Copy: root/custom/*.* to: custom/*.*", etc.
$source = $this->mod_root . str_replace('*.*', '', $source);
$target = str_replace('*.*', '', $target);
// Get all of the files in the source directory
$files = find_files($source, '.*');
// And translate into destination files
$files = str_replace($source, $target, $files);
// Get all of the sub-directories in the source directory
$directories['src'] = find_files($source, '.*', 20, true);
// And translate it into destination sub-directories
$directories['dst'] = str_replace($source, $target, $directories['src']);
// Compare source and destination subdirs, if any, in _reverse_ order! (array_pop)
for ($i = 0, $cnt = count($directories['dst']); $i < $cnt; $i++) {
$dir_source = array_pop($directories['src']);
$dir_target = array_pop($directories['dst']);
// Some MODs include 'umil/', avoid deleting!
if (strpos($dir_target, 'umil/') === 0) {
continue;
}
$src_file_cnt = directory_num_files($dir_source, false, true);
$dst_file_cnt = directory_num_files($phpbb_root_path . $dir_target, false, true);
$src_dir_cnt = directory_num_files($dir_source, true, true);
$dst_dir_cnt = directory_num_files($phpbb_root_path . $dir_target, true, true);
// Do we have a match in recursive file count and match in recursive subdir count?
// This could be vastly improved..
if ($src_file_cnt == $dst_file_cnt && $src_dir_cnt == $dst_dir_cnt) {
$directories['del'][] = $dir_target;
}
unset($dir_source, $dir_target, $src_file_cnt, $dst_file_cnt, $src_dir_cnt, $dst_dir_cnt);
//cleanup
}
foreach ($files as $file) {
// Some MODs include 'umil/', avoid deleting!
if (strpos($file, 'umil/') === 0) {
continue;
} else {
if (!file_exists($phpbb_root_path . $file) && ($change || $display)) {
开发者ID:danielgospodinow,项目名称:GamingZone,代码行数:67,代码来源:acp_mods.php
示例20: strtolower
<?php
/**
* @package FacePress
* @version $Id$
* @copyright (c) 2010 JiffSoft
* @license http://www.gnu.org/licenses/gpl.html GNU General Public License v3
*/
$sub_action = strtolower(strlen($_POST['sub']) > 0 ? $_POST['sub'] : 'list');
if (strlen($_POST['tid']) > 0) {
// Gather the post ID we are talking about
$post = FPBDatabase::Instance()->GatherPostById($_POST['tid']);
}
echo '<h3>Plugin Management</h3>';
// Load plugin list
$yaml_files = find_files(BASEDIR . '/fpb-content/plugins', '/ya?ml$/i');
$plugins = array();
foreach ($yaml_files as $yaml) {
array_push($plugins, Spyc::YAMLLoad($yaml));
}
switch ($sub_action) {
case 'activate':
break;
case 'deactivate':
/**
* @todo Deactivation should look for if the plugin is core (MissionCritical: true) in the YML, or
* if it is required (RequiresPlugins:) from another plugin
*/
break;
case 'list':
default:
开发者ID:JiffSoft,项目名称:FacePress,代码行数:31,代码来源:plugins.php
注:本文中的find_files函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论