protected function determineSourceTypes($source)
    {
        if (is_string($source)) {
            return ['string'];
        } elseif (is_array($source)) {
            return ['array'];
        } elseif (is_float($source)) {
            return ['float'];
        } elseif (is_integer($source)) {
            return ['integer'];
        } elseif (is_bool($source)) {
            return ['boolean'];
        } elseif (is_object($source)) {
            $class = get_class($source);
            $parentClasses = class_parents($class);
            $interfaces = class_implements($class);

            return array_merge([$class], $parentClasses, $interfaces, ['object']);
        } else {
            throw new Exception\InvalidSourceException('The source is not of type string, array, float, integer, boolean or object, but of type "' . gettype($source) . '"', 1297773150);
        }
    }
protected function determineSourceTypes($source)
    {
        if (is_string($source)) {
            return ['string'];
        } elseif (is_array($source)) {
            return ['array'];
        } elseif (is_float($source)) {
            return ['float'];
        } elseif (is_integer($source)) {
            return ['integer'];
        } elseif (is_bool($source)) {
            return ['boolean'];
        } elseif (is_object($source)) {
            $class = get_class($source);
            $parentClasses = class_parents($class);
            $interfaces = class_implements($class);

            return array_merge([$class], $parentClasses, $interfaces, ['object']);
        } else {
            throw new Exception\InvalidSourceException('The source is not of type string, array, float, integer, boolean or object, but of type "' . gettype($source) . '"', 1297773150);
        }
    }
protected function determineSourceTypes ( $ source ) { if ( is_string ( $ source ) ) { return [ 'string' ] ; } elseif ( is_array ( $ source ) ) { return [ 'array' ] ; } elseif ( is_float ( $ source ) ) { return [ 'float' ] ; } elseif ( is_integer ( $ source ) ) { return [ 'integer' ] ; } elseif ( is_bool ( $ source ) ) { return [ 'boolean' ] ; } elseif ( is_object ( $ source ) ) { $ class = get_class ( $ source ) ; $ parentClasses = class_parents ( $ class ) ; $ interfaces = class_implements ( $ class ) ; return array_merge ( [ $ class ] , $ parentClasses , $ interfaces , [ 'object' ] ) ; } else { throw new Exception \ InvalidSourceException ( 'The source is not of type string, array, float, integer, boolean or object, but of type "' . gettype ( $ source ) . '"' , 1297773150 ) ; } }
Determine the type of the source data, or throw an exception if source was an unsupported format.

@param mixed $source
@return array Possible source types (single value for simple typed source, multiple values for object source)
@throws Exception\InvalidSourceException
Determine the type of the source data or throw an exception if source was an unsupported format .