src/Common/Internal/Validate.php
public static function isA($objectInstance, $class, $name)
    {
        self::isString($class, 'class');
        self::notNull($objectInstance, 'objectInstance');
        self::isObject($objectInstance, 'objectInstance');

        $objectType = get_class($objectInstance);

        if (is_a($objectInstance, $class)) {
            return true;
        } else {
            throw new \InvalidArgumentException(
                sprintf(
                    Resources::INSTANCE_TYPE_VALIDATION_MSG,
                    $name,
                    $objectType,
                    $class
                )
            );
        }
    }
public static function isA($objectInstance, $class, $name)
    {
        self::isString($class, 'class');
        self::notNull($objectInstance, 'objectInstance');
        self::isObject($objectInstance, 'objectInstance');

        $objectType = get_class($objectInstance);

        if (is_a($objectInstance, $class)) {
            return true;
        } else {
            throw new \InvalidArgumentException(
                sprintf(
                    Resources::INSTANCE_TYPE_VALIDATION_MSG,
                    $name,
                    $objectType,
                    $class
                )
            );
        }
    }
public static function isA ( $ objectInstance , $ class , $ name ) { self :: isString ( $ class , 'class' ) ; self :: notNull ( $ objectInstance , 'objectInstance' ) ; self :: isObject ( $ objectInstance , 'objectInstance' ) ; $ objectType = get_class ( $ objectInstance ) ; if ( is_a ( $ objectInstance , $ class ) ) { return true ; } else { throw new \ InvalidArgumentException ( sprintf ( Resources :: INSTANCE_TYPE_VALIDATION_MSG , $ name , $ objectType , $ class ) ) ; } }
Throws exception if the object is not of the specified class type.

@param mixed  $objectInstance An object that requires class type validation
@param string $class          The class the object instance should be
@param string $name           The parameter name

@throws \InvalidArgumentException

@return bool
Throws exception if the object is not of the specified class type .