scratch – Blame information for rev 87

Subversion Repositories:
Rev:
Rev Author Line No. Line
87 office 1 <?php
2 /*
3 * This file is deprecated and only included so that backwards compatibility
4 * is maintained for downstream packages.
5 *
6 * Use the functions available in the Utils class instead of the the below
7 * namespaced functions.
8 */
9 namespace GuzzleHttp\Stream;
10  
11 if (!defined('GUZZLE_STREAMS_FUNCTIONS')) {
12  
13 define('GUZZLE_STREAMS_FUNCTIONS', true);
14  
15 /**
16 * @deprecated Moved to Stream::factory
17 */
18 function create($resource = '', $size = null)
19 {
20 return Stream::factory($resource, $size);
21 }
22  
23 /**
24 * @deprecated Moved to Utils::copyToString
25 */
26 function copy_to_string(StreamInterface $stream, $maxLen = -1)
27 {
28 return Utils::copyToString($stream, $maxLen);
29 }
30  
31 /**
32 * @deprecated Moved to Utils::copyToStream
33 */
34 function copy_to_stream(
35 StreamInterface $source,
36 StreamInterface $dest,
37 $maxLen = -1
38 ) {
39 Utils::copyToStream($source, $dest, $maxLen);
40 }
41  
42 /**
43 * @deprecated Moved to Utils::hash
44 */
45 function hash(
46 StreamInterface $stream,
47 $algo,
48 $rawOutput = false
49 ) {
50 return Utils::hash($stream, $algo, $rawOutput);
51 }
52  
53 /**
54 * @deprecated Moced to Utils::readline
55 */
56 function read_line(StreamInterface $stream, $maxLength = null)
57 {
58 return Utils::readline($stream, $maxLength);
59 }
60  
61 /**
62 * @deprecated Moved to Utils::open()
63 */
64 function safe_open($filename, $mode)
65 {
66 return Utils::open($filename, $mode);
67 }
68 }