protected function isObjectOfSameType($type, $value)
    {
        if (false === is_object($value)) {
            return false;
        }

        return is_a($value, $type);
    }
protected function isObjectOfSameType($type, $value)
    {
        if (false === is_object($value)) {
            return false;
        }

        return is_a($value, $type);
    }
protected function isObjectOfSameType ( $ type , $ value ) { if ( false === is_object ( $ value ) ) { return false ; } return is_a ( $ value , $ type ) ; }
Checks if the object is of this type or has this type as one of its parents

@param string $type  class name of type being required
@param mixed  $value Some PHP value to be tested

@return boolean True if $object has type of $type
Checks if the object is of this type or has this type as one of its parents