13 $files=\glob($pattern, $flags);
14 foreach ( \glob(\dirname($pattern) .
'/*', GLOB_ONLYDIR | GLOB_NOSORT) as $dir ) {
15 $files=\array_merge($files, self::glob_recursive($dir .
'/' . \basename($pattern), $flags));
21 $files=\glob($folder .
'/*');
22 foreach ( $files as $file ) {
30 return \mkdir($dir, 0777,
true);
37 $path=\str_replace(
"\\", DS, $path);
39 $path=\str_replace(
"/", DS, $path);
40 $path=\str_replace(DS . DS, DS, $path);
50 $str=\file_get_contents(
$source);
51 return self::replaceFromTemplate($str, $keyAndValues);
57 if (($str=self::openReplaceInTemplateFile(
$source, $keyAndValues))) {
58 return \file_put_contents($destination, $str, LOCK_EX);
64 array_walk($keyAndValues,
function (&$item) {
66 $item=\implode(
"\n", $item);
68 $str=\str_replace(array_keys($keyAndValues), array_values($keyAndValues), $content);
73 return \file_put_contents($destination, self::replaceFromTemplate($content, $keyAndValues), LOCK_EX);
77 if (\file_exists($file)) {
static openReplaceInTemplateFile($source, $keyAndValues)
static glob_recursive($pattern, $flags=0)
$source
Project: doxygen-php-filters Author: Alex Schickedanz (AbcAeffchen) Date: 05.03.2015 License: GPL v2...
static replaceWriteFromContent($content, $destination, $keyAndValues)
static openReplaceWriteFromTemplateFile($source, $destination, $keyAndValues)
static replaceFromTemplate($content, $keyAndValues)
static deleteAllFilesFromFolder($folder)
static tryToRequire($file)
static cleanPathname($path)
static endswith($hay, $needle)