19 declare(strict_types=1);
    43         if (!is_string($string)) {
    44             throw new \InvalidArgumentException(
    45                 'The argument $string must be of type string but was "' . gettype($string) . 
'"'    49         $stream = 
new Stream(fopen(
'php://memory', 
'rw'));
    50         $stream->write($string);
    66         if (!is_resource($resource)) {
    67             throw new \InvalidArgumentException(
    68                 'The argument $resource must be of type resource but was "' . gettype($resource) . 
'"'    71         return new Stream($resource);
    76         if (!is_resource($resource)) {
    77             throw new \InvalidArgumentException(
    78                 'The argument $resource must be of type resource but was "' . gettype($resource) . 
'"'    88             $resource = fopen(
'zip://' . $path_to_zip . 
'#/' . $path_inside_zip, 
'rb');
    93             $resource = $resource ?: fopen(
'zip://' . $path_to_zip . 
'#' . $path_inside_zip, 
'rb');
    98         if (!is_resource($resource)) {
    99             throw new \InvalidArgumentException(
   100                 'The argument $path_to_zip must be an existing zip file path and $path_inside_zip must be a valid path inside the zip file.'   115         $resource = $stream->
detach();
   116         return self::ofResource($resource);
 
Stream factory which enables the user to create streams without the knowledge of the concrete class...
 
Interface Observer  Contains several chained tasks and infos about them. 
 
static ofFileInsideZIP(string $path_to_zip, string $path_inside_zip)
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
static ofResource($resource)
Wraps an already created resource with the stream abstraction. 
 
static ofReattachableResource($resource)
 
static ofString(string $string)
Creates a new stream with an initial value. 
 
static ofPsr7Stream(StreamInterface $stream)
Create a FileStream from a Psr7 compliant stream.