ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPStreamFunctions.php
Go to the documentation of this file.
1<?php
2
4
19{
20
30 public static function ftell($handle)
31 {
32 return ftell($handle);
33 }
34
35
43 public static function fclose($handle)
44 {
45 fclose($handle);
46 }
47
48
58 public static function fseek($stream, $offset, $whence)
59 {
60 return fseek($stream, $offset, $whence);
61 }
62
63
74 public static function fread($handle, $length)
75 {
76 return fread($handle, $length);
77 }
78
79
90 public static function stream_get_contents($handle, $length = -1)
91 {
92 return stream_get_contents($handle, $length);
93 }
94
95
107 public static function fwrite($handle, $string, $length = null)
108 {
109
110 //it seems like php juggles the null to 0 and pass it to the function which leads to a write operation of zero length ...
111 if (is_null($length)) {
112 return fwrite($handle, $string);
113 }
114
115 return fwrite($handle, $string, $length);
116 }
117}
An exception for terminatinating execution or to throw for unit testing.
static fwrite($handle, $string, $length=null)
fwrite wrapper
static fread($handle, $length)
fread wrapper
static stream_get_contents($handle, $length=-1)
stream_get_contents wrapper
static fclose($handle)
fclose wrapper
static fseek($stream, $offset, $whence)
fseek wrapper.
$stream
PHP stream implementation.