ILIAS  release_8 Revision v8.24
PHPStreamFunctions.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
7/******************************************************************************
8 *
9 * This file is part of ILIAS, a powerful learning management system.
10 *
11 * ILIAS is licensed with the GPL-3.0, you should have received a copy
12 * of said license along with the source code.
13 *
14 * If this is not the case or you just want to try ILIAS, you'll find
15 * us at:
16 * https://www.ilias.de
17 * https://github.com/ILIAS-eLearning
18 *
19 *****************************************************************************/
20
35{
45 public static function ftell($handle)
46 {
47 return ftell($handle);
48 }
49
54 public static function fseek($stream, int $offset, int $whence): int
55 {
56 return fseek($stream, $offset, $whence);
57 }
58
63 public static function fclose($handle): void
64 {
65 fclose($handle);
66 }
67
73 public static function fread($handle, int $length)
74 {
75 return fread($handle, $length);
76 }
77
83 public static function stream_get_contents($handle, $length = -1)
84 {
85 return stream_get_contents($handle, $length);
86 }
87
94 public static function fwrite($handle, string $string, ?int $length = null)
95 {
96 if (is_null($length)) {
97 return fwrite($handle, $string);
98 }
99
100 return fwrite($handle, $string, $length);
101 }
102}
static stream_get_contents($handle, $length=-1)
static fseek($stream, int $offset, int $whence)
static fwrite($handle, string $string, ?int $length=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...