isInstanceOf() public method

public isInstanceOf ( $value, $failMessage = null )
Ejemplo n.º 1
0
 public function isInstanceOf($value, $failMessage = null)
 {
     try {
         $this->check($value, __FUNCTION__);
     } catch (\logicException $exception) {
         if (self::classExists($value) === false || strtolower(ltrim($value, '\\')) !== 'exception' && is_subclass_of($value, 'exception') === false) {
             throw new exceptions\logic\invalidArgument('Argument of ' . __METHOD__ . '() must be a \\exception instance or an exception class name');
         }
     }
     return parent::isInstanceOf($value, $failMessage);
 }