代码生成器
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
namespace JaguarJack\Generator\Factory;
|
||||
namespace catcher\generate\factory;
|
||||
|
||||
use catcher\CatchAdmin;
|
||||
|
||||
@@ -63,4 +63,22 @@ abstract class Factory
|
||||
|
||||
return root_path() . $psr4[$projectRootNamespace.'\\'] . DIRECTORY_SEPARATOR. $module . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
* parse filename
|
||||
*
|
||||
* @time 2020年04月27日
|
||||
* @param $filename
|
||||
* @return array
|
||||
*/
|
||||
public function parseFilename($filename)
|
||||
{
|
||||
$namespace = explode('\\', $filename);
|
||||
|
||||
$className = ucfirst(array_pop($namespace));
|
||||
|
||||
$namespace = implode('\\', $namespace);
|
||||
|
||||
return [$className, $namespace];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user