Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 23... Línea 23...
23
     * string casting operations.
23
     * string casting operations.
24
     *
24
     *
25
     * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
25
     * @see http://php.net/manual/en/language.oop5.magic.php#object.tostring
26
     * @return string
26
     * @return string
27
     */
27
     */
28
    public function __toString();
28
    public function __toString(): string;
Línea 29... Línea 29...
29
 
29
 
30
    /**
30
    /**
31
     * Closes the stream and any underlying resources.
31
     * Closes the stream and any underlying resources.
32
     *
32
     *
33
     * @return void
33
     * @return void
34
     */
34
     */
Línea 35... Línea 35...
35
    public function close();
35
    public function close(): void;
36
 
36
 
37
    /**
37
    /**
38
     * Separates any underlying resources from the stream.
38
     * Separates any underlying resources from the stream.
Línea 46... Línea 46...
46
    /**
46
    /**
47
     * Get the size of the stream if known.
47
     * Get the size of the stream if known.
48
     *
48
     *
49
     * @return int|null Returns the size in bytes if known, or null if unknown.
49
     * @return int|null Returns the size in bytes if known, or null if unknown.
50
     */
50
     */
51
    public function getSize();
51
    public function getSize(): ?int;
Línea 52... Línea 52...
52
 
52
 
53
    /**
53
    /**
54
     * Returns the current position of the file read/write pointer
54
     * Returns the current position of the file read/write pointer
55
     *
55
     *
56
     * @return int Position of the file pointer
56
     * @return int Position of the file pointer
57
     * @throws \RuntimeException on error.
57
     * @throws \RuntimeException on error.
58
     */
58
     */
Línea 59... Línea 59...
59
    public function tell();
59
    public function tell(): int;
60
 
60
 
61
    /**
61
    /**
62
     * Returns true if the stream is at the end of the stream.
62
     * Returns true if the stream is at the end of the stream.
63
     *
63
     *
64
     * @return bool
64
     * @return bool
Línea 65... Línea 65...
65
     */
65
     */
66
    public function eof();
66
    public function eof(): bool;
67
 
67
 
68
    /**
68
    /**
69
     * Returns whether or not the stream is seekable.
69
     * Returns whether or not the stream is seekable.
70
     *
70
     *
Línea 71... Línea 71...
71
     * @return bool
71
     * @return bool
72
     */
72
     */
73
    public function isSeekable();
73
    public function isSeekable(): bool;
74
 
74
 
Línea 82... Línea 82...
82
     *     PHP $whence values for `fseek()`.  SEEK_SET: Set position equal to
82
     *     PHP $whence values for `fseek()`.  SEEK_SET: Set position equal to
83
     *     offset bytes SEEK_CUR: Set position to current location plus offset
83
     *     offset bytes SEEK_CUR: Set position to current location plus offset
84
     *     SEEK_END: Set position to end-of-stream plus offset.
84
     *     SEEK_END: Set position to end-of-stream plus offset.
85
     * @throws \RuntimeException on failure.
85
     * @throws \RuntimeException on failure.
86
     */
86
     */
87
    public function seek($offset, $whence = SEEK_SET);
87
    public function seek(int $offset, int $whence = SEEK_SET): void;
Línea 88... Línea 88...
88
 
88
 
89
    /**
89
    /**
90
     * Seek to the beginning of the stream.
90
     * Seek to the beginning of the stream.
91
     *
91
     *
Línea 94... Línea 94...
94
     *
94
     *
95
     * @see seek()
95
     * @see seek()
96
     * @link http://www.php.net/manual/en/function.fseek.php
96
     * @link http://www.php.net/manual/en/function.fseek.php
97
     * @throws \RuntimeException on failure.
97
     * @throws \RuntimeException on failure.
98
     */
98
     */
99
    public function rewind();
99
    public function rewind(): void;
Línea 100... Línea 100...
100
 
100
 
101
    /**
101
    /**
102
     * Returns whether or not the stream is writable.
102
     * Returns whether or not the stream is writable.
103
     *
103
     *
104
     * @return bool
104
     * @return bool
105
     */
105
     */
Línea 106... Línea 106...
106
    public function isWritable();
106
    public function isWritable(): bool;
107
 
107
 
108
    /**
108
    /**
109
     * Write data to the stream.
109
     * Write data to the stream.
110
     *
110
     *
111
     * @param string $string The string that is to be written.
111
     * @param string $string The string that is to be written.
112
     * @return int Returns the number of bytes written to the stream.
112
     * @return int Returns the number of bytes written to the stream.
113
     * @throws \RuntimeException on failure.
113
     * @throws \RuntimeException on failure.
Línea 114... Línea 114...
114
     */
114
     */
115
    public function write($string);
115
    public function write(string $string): int;
116
 
116
 
117
    /**
117
    /**
118
     * Returns whether or not the stream is readable.
118
     * Returns whether or not the stream is readable.
119
     *
119
     *
Línea 120... Línea 120...
120
     * @return bool
120
     * @return bool
121
     */
121
     */
122
    public function isReadable();
122
    public function isReadable(): bool;
123
 
123
 
Línea 129... Línea 129...
129
     *     call returns fewer bytes.
129
     *     call returns fewer bytes.
130
     * @return string Returns the data read from the stream, or an empty string
130
     * @return string Returns the data read from the stream, or an empty string
131
     *     if no bytes are available.
131
     *     if no bytes are available.
132
     * @throws \RuntimeException if an error occurs.
132
     * @throws \RuntimeException if an error occurs.
133
     */
133
     */
134
    public function read($length);
134
    public function read(int $length): string;
Línea 135... Línea 135...
135
 
135
 
136
    /**
136
    /**
137
     * Returns the remaining contents in a string
137
     * Returns the remaining contents in a string
138
     *
138
     *
139
     * @return string
139
     * @return string
140
     * @throws \RuntimeException if unable to read or an error occurs while
140
     * @throws \RuntimeException if unable to read or an error occurs while
141
     *     reading.
141
     *     reading.
142
     */
142
     */
Línea 143... Línea 143...
143
    public function getContents();
143
    public function getContents(): string;
144
 
144
 
145
    /**
145
    /**
146
     * Get stream metadata as an associative array or retrieve a specific key.
146
     * Get stream metadata as an associative array or retrieve a specific key.
147
     *
147
     *
148
     * The keys returned are identical to the keys returned from PHP's
148
     * The keys returned are identical to the keys returned from PHP's
149
     * stream_get_meta_data() function.
149
     * stream_get_meta_data() function.
150
     *
150
     *
151
     * @link http://php.net/manual/en/function.stream-get-meta-data.php
151
     * @link http://php.net/manual/en/function.stream-get-meta-data.php
152
     * @param string $key Specific metadata to retrieve.
152
     * @param string|null $key Specific metadata to retrieve.
153
     * @return array|mixed|null Returns an associative array if no key is
153
     * @return array|mixed|null Returns an associative array if no key is
154
     *     provided. Returns a specific key value if a key is provided and the
154
     *     provided. Returns a specific key value if a key is provided and the
155
     *     value is found, or null if the key is not found.
155
     *     value is found, or null if the key is not found.
156
     */
156
     */