커맨드 출력 준비

This commit is contained in:
2018-11-23 03:12:08 +09:00
parent c5868b7e5a
commit 2e462f39f7
6 changed files with 125 additions and 232 deletions
+6 -1
View File
@@ -572,9 +572,14 @@ class Util extends \utilphp\util
/**
* fqn 클래스 경로에서 클래스 이름을 받아옴
*/
function getClassName(string $classpath)
public static function getClassName(string $classpath)
{
if ($pos = strrpos($classpath, '\\')) return substr($classpath, $pos + 1);
return $pos;
}
public static function getClassNameFromObj($object){
$reflect = new ReflectionClass($object);
return $reflect->getShortName();
}
};