src/Config/ConfigResolver.php
public function resolve($resource): Stream
    {
        // detect best way to load and process configuration content
        if (is_array($resource)) {
            return new DataStream($resource, new ArrayProcessor());
        } elseif (is_callable($resource)) {
            return new DataStream($resource, new CallableProcessor());
        } elseif ($resource instanceof Config) {
            return new DataStream($resource, new ConfigProcessor());
        } elseif ($resource instanceof Collection) {
            return new DataStream($resource, new CollectionProcessor());
        } elseif ($resource instanceof Stream) {
            return $resource;
        } elseif ($resource instanceof stdClass) {
            return new DataStream($resource, new StdClassProcessor());
        } elseif (is_string($resource)) {
            $filesHandlers = $this->filesHandlers;
            if (null === $filesHandlers) {
                $filesHandlers = new FilesHandlers(null);
            }
            return new FileStream($resource, $filesHandlers);
        }

        throw new UnknownResourceException($resource);
    }
public function resolve($resource): Stream
    {
        // detect best way to load and process configuration content
        if (is_array($resource)) {
            return new DataStream($resource, new ArrayProcessor());
        } elseif (is_callable($resource)) {
            return new DataStream($resource, new CallableProcessor());
        } elseif ($resource instanceof Config) {
            return new DataStream($resource, new ConfigProcessor());
        } elseif ($resource instanceof Collection) {
            return new DataStream($resource, new CollectionProcessor());
        } elseif ($resource instanceof Stream) {
            return $resource;
        } elseif ($resource instanceof stdClass) {
            return new DataStream($resource, new StdClassProcessor());
        } elseif (is_string($resource)) {
            $filesHandlers = $this->filesHandlers;
            if (null === $filesHandlers) {
                $filesHandlers = new FilesHandlers(null);
            }
            return new FileStream($resource, $filesHandlers);
        }

        throw new UnknownResourceException($resource);
    }
public function resolve ( $ resource ) : Stream { // detect best way to load and process configuration content if ( is_array ( $ resource ) ) { return new DataStream ( $ resource , new ArrayProcessor ( ) ) ; } elseif ( is_callable ( $ resource ) ) { return new DataStream ( $ resource , new CallableProcessor ( ) ) ; } elseif ( $ resource instanceof Config ) { return new DataStream ( $ resource , new ConfigProcessor ( ) ) ; } elseif ( $ resource instanceof Collection ) { return new DataStream ( $ resource , new CollectionProcessor ( ) ) ; } elseif ( $ resource instanceof Stream ) { return $ resource ; } elseif ( $ resource instanceof stdClass ) { return new DataStream ( $ resource , new StdClassProcessor ( ) ) ; } elseif ( is_string ( $ resource ) ) { $ filesHandlers = $ this -> filesHandlers ; if ( null === $ filesHandlers ) { $ filesHandlers = new FilesHandlers ( null ) ; } return new FileStream ( $ resource , $ filesHandlers ) ; } throw new UnknownResourceException ( $ resource ) ; }
Resolve a config resource to a valid StreamInterface

@param mixed $resource
@return Stream
@throws UnknownResourceException
Resolve a config resource to a valid StreamInterface