{
return glob(APPPATH.\Config::get('migrations.folder').'*_*.php');
{
$files = glob($m .$name.'/'.\Config::get('migrations.folder').'*_*.php');
{
$files = array_merge($files, glob($m.'*/'.\Config::get('migrations.folder').'*_*.php'));
{
$files = glob($p .$name.'/'.\Config::get('migrations.folder').'*_*.php');
{
$files = array_merge($files, glob($p.'*/'.\Config::get('migrations.folder').'*_*.php'));
/**
* AnnotationGlobLoader loads routing information from annotations set
*/
class AnnotationGlobLoader extends AnnotationDirectoryLoader
/**
* Loads from annotations from a directory glob pattern.
*
* @param string $glob A directory glob pattern containing "*"
*/
public function load($glob, $type = null)
$collection = new RouteCollection();
foreach ($this->locator->getAbsolutePaths($glob) as $path) {
/**
* Gets all absolute paths matched by expanding the glob pattern within all
*
* @param string $glob
*
// scan extracted directory for nested dependency
foreach (glob("$dest/**/composer.json") as $composer) {
/**
* From comment by "Mike" on http://us2.php.net/manual/en/function.glob.php
* @param string $pattern
* @param int $flags - as per glob function
*/
function glob_recursive($pattern, $flags = 0) {
$files = glob($pattern, $flags);
foreach (glob(dirname($pattern).'/*', GLOB_ONLYDIR|GLOB_NOSORT) as $dir)
{
$files = array_merge($files, glob_recursive($dir.'/'.basename($pattern), $flags));
$fileList = glob_recursive($libraryPath . '*.php');
// iOS
$ipa = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_IOS_IPA));
$plist = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_IOS_PLIST));
$profile = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_IOS_PROFILE));
// Android
$apk = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_ANDROID_APK));
$json = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_ANDROID_JSON));
if ($language) {
$note = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_COMMON_NOTES . '.' . $language));
if (!$note) {
$note = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_COMMON_NOTES)); // the default language file should not have a language extension, so if en is default, never creaete a .html.en file!
}
$icon = @array_shift(glob($this->appDirectory.$bundleidentifier . '/*' . self::FILE_COMMON_ICON));
$_tmpDuplicatorOptions = get_option('duplicator_options', false);
$GLOBALS['duplicator_opts'] = ($_tmpDuplicatorOptions == false) ? array() : @unserialize($_tmpDuplicatorOptions);
//OPTIONS
$GLOBALS['duplicator_opts']['dbhost'] = isset($GLOBALS['duplicator_opts']['dbhost']) ? $GLOBALS['duplicator_opts']['dbhost'] : '';
$GLOBALS['duplicator_opts']['dbname'] = isset($GLOBALS['duplicator_opts']['dbname']) ? $GLOBALS['duplicator_opts']['dbname'] : '';
$GLOBALS['duplicator_opts']['dbuser'] = isset($GLOBALS['duplicator_opts']['dbuser']) ? $GLOBALS['duplicator_opts']['dbuser'] : '';
$GLOBALS['duplicator_opts']['dbiconv'] = isset($GLOBALS['duplicator_opts']['dbiconv']) ? $GLOBALS['duplicator_opts']['dbiconv'] : '1';
$GLOBALS['duplicator_opts']['dbadd_drop'] = isset($GLOBALS['duplicator_opts']['dbadd_drop']) ? $GLOBALS['duplicator_opts']['dbadd_drop'] : '0';
$GLOBALS['duplicator_opts']['nurl'] = isset($GLOBALS['duplicator_opts']['nurl'] ) ? $GLOBALS['duplicator_opts']['nurl'] : '';
$GLOBALS['duplicator_opts']['email-me'] = isset($GLOBALS['duplicator_opts']['email-me']) ? $GLOBALS['duplicator_opts']['email-me'] : '0';
$GLOBALS['duplicator_opts']['log_level'] = isset($GLOBALS['duplicator_opts']['log_level']) ? $GLOBALS['duplicator_opts']['log_level'] : '0';
$GLOBALS['duplicator_opts']['max_time'] = is_numeric($GLOBALS['duplicator_opts']['max_time']) ? $GLOBALS['duplicator_opts']['max_time'] : 1000;
$GLOBALS['duplicator_opts']['max_memory'] = isset($GLOBALS['duplicator_opts']['max_memory']) ? $GLOBALS['duplicator_opts']['max_memory'] : '1000M';
$GLOBALS['duplicator_opts']['email_others'] = isset($GLOBALS['duplicator_opts']['email_others']) ? $GLOBALS['duplicator_opts']['email_others'] : '';
$GLOBALS['duplicator_opts']['skip_ext'] = isset($GLOBALS['duplicator_opts']['skip_ext']) ? $GLOBALS['duplicator_opts']['skip_ext'] : '';
// Setup the global database connection
// We assume all variables set in this file will be global.
// If the file is inovked inside a function, we will lose them all.
// So, make all local variables, global
gp_set_globals( get_defined_vars() );
require_once GP_PATH . GP_INC . 'thing.php';
foreach( glob( GP_PATH . GP_INC . 'things/*.php' ) as $thing_file ) {
require_once( GP_PATH . GP_INC . 'router.php' );
foreach( glob( GP_PATH . GP_INC . 'routes/*.php' ) as $route_file ) {
require_once( GP_PATH . GP_INC . 'class.gp-format.php' );
foreach( glob( GP_PATH . GP_INC . 'formats/format_*.php' ) as $format_file ) {
// Let's do it again, there are more variables added since last time we called it
gp_set_globals( get_defined_vars() );
// Get actual drives
$drive_paths = (array) @glob('/sys/block/*/device/model', GLOB_NOSORT);
// Use glob to get paths
$nets = (array) @glob('/sys/class/net/*', GLOB_NOSORT);
// Here they should be
$bats = (array) @glob('/sys/class/power_supply/BAT*', GLOB_NOSORT);
// Get all the paths to each process' status file
$processes = (array) @glob('/proc/*/status', GLOB_NOSORT);
if (count($this->settings['services']['executables']) > 0) {
$potential_paths = @glob('/proc/*/cmdline');
// scan for files (split up into several calls to overcome maximum limitation of 260 chars in glob pattern)
$files = globDir($sourceDir, '*.{xml,xml.template,xml.additional,xml.dist,xml.sample,xsd,mxml}', GLOB_BRACE);
$files = array_merge($files, globDir($sourceDir, '*.{php,php.sample,phtml,html,htm,css,js,as,sql}', GLOB_BRACE));
foreach ($blacklist as $item) {
$excludeDirs = glob("{$sourceDir}/{$item}", GLOB_ONLYDIR) ?: array();
if (!$excludeDirs) {
$excludeFiles = glob("{$sourceDir}/{$item}", GLOB_BRACE) ?: array();
/**
* Perform a glob search in specified directory
}
$result = glob($dir . '/' . $filesPattern, $flags) ?: array();
$dirs = glob($dir . '/*', GLOB_ONLYDIR) ?: array();
foreach ($dirs as $innerDir) {
$result = array_merge($result, globDir($innerDir, $filesPattern, $flags));
* <li>
* <b>glob:</b><i>pattern</i>:
* Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a
* kind of limited regular-expression syntax typically used in command-line
* shells. In a glob pattern, "*" represents any sequence of characters, and "?"
* represents any single character. Glob patterns match against the entire
* string.
*
* If no pattern prefix is specified, Selenium assumes that it's a "glob"
* where both commas and backslashes in the values are backslash-escaped.
* When providing a pattern, the optional matching syntax (i.e. glob,
$_tmpDuplicatorOptions = get_option('duplicator_options', false);
$GLOBALS['duplicator_opts'] = ($_tmpDuplicatorOptions == false) ? array() : @unserialize($_tmpDuplicatorOptions);
//OPTIONS
$GLOBALS['duplicator_opts']['dbhost'] = isset($GLOBALS['duplicator_opts']['dbhost']) ? $GLOBALS['duplicator_opts']['dbhost'] : '';
$GLOBALS['duplicator_opts']['dbname'] = isset($GLOBALS['duplicator_opts']['dbname']) ? $GLOBALS['duplicator_opts']['dbname'] : '';
$GLOBALS['duplicator_opts']['dbuser'] = isset($GLOBALS['duplicator_opts']['dbuser']) ? $GLOBALS['duplicator_opts']['dbuser'] : '';
$GLOBALS['duplicator_opts']['dbadd_drop'] = isset($GLOBALS['duplicator_opts']['dbadd_drop']) ? $GLOBALS['duplicator_opts']['dbadd_drop'] : '0';
$GLOBALS['duplicator_opts']['url_new'] = isset($GLOBALS['duplicator_opts']['url_new'] ) ? $GLOBALS['duplicator_opts']['url_new'] : '';
$GLOBALS['duplicator_opts']['email-me'] = isset($GLOBALS['duplicator_opts']['email-me']) ? $GLOBALS['duplicator_opts']['email-me'] : '0';
$GLOBALS['duplicator_opts']['log_level'] = isset($GLOBALS['duplicator_opts']['log_level']) ? $GLOBALS['duplicator_opts']['log_level'] : '0';
$GLOBALS['duplicator_opts']['email_others'] = isset($GLOBALS['duplicator_opts']['email_others']) ? $GLOBALS['duplicator_opts']['email_others'] : '';
$GLOBALS['duplicator_opts']['skip_ext'] = isset($GLOBALS['duplicator_opts']['skip_ext']) ? $GLOBALS['duplicator_opts']['skip_ext'] : '';
$GLOBALS['duplicator_opts']['dir_bypass'] = isset($GLOBALS['duplicator_opts']['dir_bypass']) ? $GLOBALS['duplicator_opts']['dir_bypass'] : '';
$GLOBALS['duplicator_opts']['rm_snapshot'] = isset($GLOBALS['duplicator_opts']['rm_snapshot']) ? $GLOBALS['duplicator_opts']['rm_snapshot'] : '1';
// we live is register_globals Off world forever..
function unregister_GLOBALS()
{
if (!ini_get('register_globals')) {
// Might want to change this perhaps to a nicer error
if (isset($_REQUEST['GLOBALS']) || isset($_FILES['GLOBALS'])) {
die('GLOBALS overwrite attempt detected');
}
// Variables that shouldn't be unset
$noUnset = array('GLOBALS', '_GET',
/**
* Replace glob() since this function is apparently
*
* @see glob()
* <li>
* <b>glob:</b><i>pattern</i>:
* Match a string against a "glob" (aka "wildmat") pattern. "Glob" is a
* kind of limited regular-expression syntax typically used in command-line
* shells. In a glob pattern, "*" represents any sequence of characters, and "?"
* represents any single character. Glob patterns match against the entire
* string.
*
* If no pattern prefix is specified, Selenium assumes that it's a "glob"
* where both commas and backslashes in the values are backslash-escaped.
* When providing a pattern, the optional matching syntax (i.e. glob,
use Symfony\Component\Finder\Glob;
/**
* FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
/**
* Converts glob to regexp.
* PCRE patterns are left unchanged.
* Glob strings are transformed with Glob::toRegex().
*
* @param string $str Pattern: glob or regexp
*
* @return string regexp corresponding to a given glob or regexp
{
return $this->isRegex($str) ? $str : Glob::toRegex($str);
use Symfony\Component\Finder\Glob;
/**
* FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
/**
* Converts glob to regexp.
* PCRE patterns are left unchanged.
* Glob strings are transformed with Glob::toRegex().
*
* @param string $str Pattern: glob or regexp
*
* @return string regexp corresponding to a given glob or regexp
{
return $this->isRegex($str) ? $str : Glob::toRegex($str);
use Symfony\Component\Finder\Glob;
/**
* FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
/**
* Converts glob to regexp.
* PCRE patterns are left unchanged.
* Glob strings are transformed with Glob::toRegex().
*
* @param string $str Pattern: glob or regexp
*
* @return string regexp corresponding to a given glob or regexp
{
return $this->isRegex($str) ? $str : Glob::toRegex($str);
use Symfony\Component\Finder\Glob;
/**
* FilenameFilterIterator filters files by patterns (a regexp, a glob, or a string).
/**
* Converts glob to regexp.
* PCRE patterns are left unchanged.
* Glob strings are transformed with Glob::toRegex().
*
* @param string $str Pattern: glob or regexp
*
* @return string regexp corresponding to a given glob or regexp
{
return $this->isRegex($str) ? $str : Glob::toRegex($str);