equal
deleted
inserted
replaced
|
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\Finder; |
|
13 |
|
14 /** |
|
15 * Extends \SplFileInfo to support relative paths |
|
16 * |
|
17 * @author Fabien Potencier <fabien@symfony.com> |
|
18 */ |
|
19 class SplFileInfo extends \SplFileInfo |
|
20 { |
|
21 private $relativePath; |
|
22 private $relativePathname; |
|
23 |
|
24 /** |
|
25 * Constructor |
|
26 * |
|
27 * @param string $file The file name |
|
28 * @param string $relativePath The relative path |
|
29 * @param string $relativePathname The relative path name |
|
30 */ |
|
31 public function __construct($file, $relativePath, $relativePathname) |
|
32 { |
|
33 parent::__construct($file); |
|
34 $this->relativePath = $relativePath; |
|
35 $this->relativePathname = $relativePathname; |
|
36 } |
|
37 |
|
38 /** |
|
39 * Returns the relative path |
|
40 * |
|
41 * @return string the relative path |
|
42 */ |
|
43 public function getRelativePath() |
|
44 { |
|
45 return $this->relativePath; |
|
46 } |
|
47 |
|
48 /** |
|
49 * Returns the relative path name |
|
50 * |
|
51 * @return string the relative path name |
|
52 */ |
|
53 public function getRelativePathname() |
|
54 { |
|
55 return $this->relativePathname; |
|
56 } |
|
57 } |