isSubclassOf() 공개 메소드

Checks whether the given class string is a subclass of this class.
public isSubclassOf ( string $className ) : boolean
$className string
리턴 boolean
 public function isSubclassOf(string $className) : bool
 {
     return $this->reflectionClass->isSubclassOf($className);
 }
예제 #2
0
 /**
  * {@inheritDoc}
  */
 public function isSubclassOf($class)
 {
     return $this->betterReflectionClass->isSubclassOf($class);
 }
 function it_might_be_a_subclass_of_another_class(ReflectionClass $reflectionClass)
 {
     $reflectionClass->isSubclassOf('stdClass')->willReturn(false);
     $this->isSubclassOf('stdClass')->shouldBe(false);
     $reflectionClass->isSubclassOf('stdClass')->willReturn(true);
     $this->isSubclassOf('stdClass')->shouldBe(true);
 }