src/Resource/ResourceProvider.php
private function processEntity($entity, $type)
    {
        $resources = $entity;

        if ($type === 'string') {
            $entity = $this->parseEntity($entity);

            if (is_file($entity)) {
                $resources = array($entity);
            } elseif (is_dir($entity)) {
                $resources = $this->getSupportedFilesInDir($entity);
            } elseif ($this->suppress_file_exceptions) {
                $resources = false;
            } else {
                throw new \InvalidArgumentException(sprintf("'%s' does not exist or is not readable", $entity));
            }
        }

        return $resources;
    }
private function processEntity($entity, $type)
    {
        $resources = $entity;

        if ($type === 'string') {
            $entity = $this->parseEntity($entity);

            if (is_file($entity)) {
                $resources = array($entity);
            } elseif (is_dir($entity)) {
                $resources = $this->getSupportedFilesInDir($entity);
            } elseif ($this->suppress_file_exceptions) {
                $resources = false;
            } else {
                throw new \InvalidArgumentException(sprintf("'%s' does not exist or is not readable", $entity));
            }
        }

        return $resources;
    }
Creates the content from the entity

@param string|array $entity The configuration entity
@param string       $type   The type of entity

@throws \InvalidArgumentException If the entity is not array|file, is readable or exists

@returns array The array of resources