public static function assertAsReadable()

in php/src/Utils.php [586:599]


    public static function assertAsReadable($value)
    {
        if (\is_string($value)) {
            return new Stream(
                fopen('data://text/plain;base64,' .
                    base64_encode($value), 'r')
            );
        }
        if ($value instanceof Stream) {
            return $value;
        }

        throw new \InvalidArgumentException('It is not a stream value.');
    }