Box\Spout\Reader\AbstractReader::getStreamWrapperScheme PHP Method

getStreamWrapperScheme() protected method

For example, php://temp => php, s3://path/to/file => s3...
protected getStreamWrapperScheme ( string $filePath ) : string | null
$filePath string Path of the file to be read
return string | null The stream wrapper scheme or NULL if not a stream wrapper
    protected function getStreamWrapperScheme($filePath)
    {
        $streamScheme = null;
        if (preg_match('/^(\\w+):\\/\\//', $filePath, $matches)) {
            $streamScheme = $matches[1];
        }
        return $streamScheme;
    }