Yaffs site version 1.1
[yaffs-website] / vendor / symfony / filesystem / Tests / Fixtures / MockStream / MockStream.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Filesystem\Tests\Fixtures\MockStream;
13
14 /**
15  * Mock stream class to be used with stream_wrapper_register.
16  * stream_wrapper_register('mock', 'Symfony\Component\Filesystem\Tests\Fixtures\MockStream\MockStream').
17  */
18 class MockStream
19 {
20     /**
21      * Opens file or URL.
22      *
23      * @param string $path        Specifies the URL that was passed to the original function
24      * @param string $mode        The mode used to open the file, as detailed for fopen()
25      * @param int    $options     Holds additional flags set by the streams API
26      * @param string $opened_path If the path is opened successfully, and STREAM_USE_PATH is set in options,
27      *                            opened_path should be set to the full path of the file/resource that was actually opened
28      *
29      * @return bool
30      */
31     public function stream_open($path, $mode, $options, &$opened_path)
32     {
33         return true;
34     }
35
36     /**
37      * @param string $path  The file path or URL to stat
38      * @param array  $flags Holds additional flags set by the streams API
39      *
40      * @return array File stats
41      */
42     public function url_stat($path, $flags)
43     {
44         return array();
45     }
46 }