Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
removeDir example
return
debug_backtrace
(
)
;
}
private
static
function
removeDir
(
$dir
)
{
$files
=
glob
(
$dir
.'/*'
)
;
foreach
(
$files
as
$file
)
{
if
(
is_file
(
$file
)
)
{
unlink
(
$file
)
;
}
else
{
self::
removeDir
(
$file
)
;
}
}
rmdir
(
$dir
)
;
}
public
static
function
setupBeforeClass
(
)
: void
{
foreach
(
get_declared_classes
(
)
as
$class
)
{
if
(
'C' ===
$class
[
0
]
&& 0 ===
strpos
(
$class
, 'ComposerAutoloaderInit'
)
)
{
$r
=
new
\
ReflectionClass
(
$class
)
;
$v
= \
dirname
(
$r
->
getFileName
(
)
, 2
)
;