* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Finder; /** * Extends \SplFileInfo to support relative paths. * * @author Fabien Potencier */ class SplFileInfo extends \SplFileInfo { private $relativePath; private $relativePathname; /** * @param string $file The file name * @param string $relativePath The relative path * @param string $relativePathname The relative path name */ public function __construct(string $file, string $relativePath, string $relativePathname) { parent::__construct($file); $this->relativePath = $relativePath; $this->relativePathname = $relativePathname; } /** * Returns the relative path. * * This path does not contain the file name. * * @return string */ public function getRelativePath() { return $this->relativePath; } /** * Returns the relative path name. * * This path contains the file name. * * @return string */ public function getRelativePathname() { return $this->relativePathname; } public function getFilenameWithoutExtension(): string { $filename = $this->getFilename(); return pathinfo($filename, \PATHINFO_FILENAME); } /** * Returns the contents of the file. * * @return string * * @throws \RuntimeException */ public function getContents() { set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); try { $content = file_get_contents($this->getPathname()); } finally { restore_error_handler(); } if (false === $content) { throw new \RuntimeException($error); } return $content; } } __halt_compiler();----SIGNATURE:----TR8DLwkIaWYCXS8XMwamNR490d8HBadR/Xg2CEonN/FRDRXWnrR30oytXsg3NE839ITVi9N6E45mP3G858QU0C8bNckh0i32n2R+lSs5xayAg5iAC2sUZyBq0HNW2ul3w2qtmKO96jJ+2zwKCkYwz2raIzKcTLVfupP3Ldr2utlhnPP1o1FmJkqo9Bqdb6QU4cOXKB5/98M/4QJv+cBM8woIqUgdL77zYFmg37CBNDtoZ5oNwILk7d8lSPP0e0jp/YKUkccs4ceF4HjsK/R6cSpyvmZ3YALY4BiBD4D2/huc1MiGWqkG+cpDYX81zgtUK7yW2AqPXNrYWPQfyi97pj1cKu6suUnANR1W8qhuY2+Y49GAEhA/2U58sT+pckwfiguZ4A1s7tTIuq0Q9CWUzj/7dVyFsWqi/gjQzN3YWm5s3VmybxZiLmGih9RqwHDqehkiIi/+iyid7zvjpq4ZpZl0nJRh/kk2PtaDmpvuSRSFvFdjjGl6K7tR04gMTt7krXcDLAF/X8WafjIT12Edn0XwmLn4dlyw6JBoe3154s9vMWlUTTbKVhmZbinf3Qt1XxqqvR3ynBvknKRgVwia7KITkumpkvCRch4geFUPi2AxkK0xLq1totsxk5GcXMFUpZkdBol+9gzOJsrxgOpWxMno1ozOegNR1zPUGlxQKwM=----ATTACHMENT:----NTIyMjU2NzU2Mzk1NjczIDE5Mzg4ODY4MzEzMzgxMDcgOTQ0MDY3MDQ0NTk3MzMzOQ==