getClassName() 공개 정적인 메소드

Get class name without namespace
public static getClassName ( mixed $object, boolean $toLower = false ) : mixed | string
$object mixed
$toLower boolean
리턴 mixed | string
예제 #1
0
파일: StringTest.php 프로젝트: jbzoo/utils
 public function testGetClassName()
 {
     isSame('JBZoo', Str::getClassName('JBZoo'));
     isSame('JBZoo', Str::getClassName('\\JBZoo'));
     isSame('CCK', Str::getClassName('\\JBZoo\\CCK'));
     isSame('Element', Str::getClassName('\\JBZoo\\CCK\\Element'));
     isSame('Repeatable', Str::getClassName('\\JBZoo\\CCK\\Element\\Repeatable'));
     isSame('StringTest', Str::getClassName($this));
     isSame('StringTest', Str::getClassName($this, false));
     isSame('StringTest', Str::getClassName($this, false));
     isSame('phpunit', Str::getClassName(__NAMESPACE__, true));
 }