cli : catch correctely the classes names
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2732 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
9
cli.php
9
cli.php
@@ -132,16 +132,17 @@ class cli
|
|||||||
else
|
else
|
||||||
$classes[str_replace ("/", "\\", substr ($file, 0, -4))] = $file;
|
$classes[str_replace ("/", "\\", substr ($file, 0, -4))] = $file;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is some classes which can be shorted (classes only in
|
// Check if there is some classes which can be shorted (classes only in
|
||||||
// controllers or only in models
|
// controllers or only in models
|
||||||
$shortClasses = array ();
|
$shortClasses = array ();
|
||||||
foreach ($classes as $class=>$file)
|
foreach ($classes as $class=>$file)
|
||||||
{
|
{
|
||||||
if (array_key_exists (substr (strstr ($class, "\\"), 1), $shortClasses))
|
$short = substr (strstr ($class, "\\"), 1);
|
||||||
unset ($shortClasses[substr (strstr ($class, "\\"), 1)]);
|
if ($short === false) $short = $class;
|
||||||
|
if (array_key_exists ($short, $shortClasses))
|
||||||
|
unset ($shortClasses[$short]);
|
||||||
else
|
else
|
||||||
$shortClasses[substr (strstr ($class, "\\"), 1)] = $class;
|
$shortClasses[$short] = $class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset ($argv[0]) && $argv[0] === "-listonly")
|
if (isset ($argv[0]) && $argv[0] === "-listonly")
|
||||||
|
|||||||
Reference in New Issue
Block a user