Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 31... Línea 31...
31
     * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
31
     * @param StreamInterface $stream Stream to cache. The cursor is assumed to be at the beginning of the stream.
32
     * @param StreamInterface $target Optionally specify where data is cached
32
     * @param StreamInterface $target Optionally specify where data is cached
33
     */
33
     */
34
    public function __construct(
34
    public function __construct(
35
        StreamInterface $stream,
35
        StreamInterface $stream,
36
        StreamInterface $target = null
36
        ?StreamInterface $target = null
37
    ) {
37
    ) {
38
        $this->remoteStream = $stream;
38
        $this->remoteStream = $stream;
39
        $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
39
        $this->stream = $target ?: new Stream(Utils::tryFopen('php://temp', 'r+'));
40
    }
40
    }