* * 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:----Mt1ptInUXQbRpD8s/7POgIO6AknWSzmZ+Jbb1kHYFs67JqZsiDM1IWqH5bMctXFuJuYRH6t8+ZlKDOOtr0BTPf030PDdXDWZhlImhU9tUBVIj1Zt0N/zM1vlOLC0pcguEShNplWfE0x/Ou7KcFwsh1nypGsSxjLmVEcRXwMwOqDN/28h/0EAqOxM7KGr6frq9a8GyOKlvxpQqqB/kCDejyru+lIS1DUE4HVh16Q5+adi6CL/dNIGpuJK4c7pSM4p/jby9lertsf2hyo2pMKyq3FaxRAHmwFby3OWM28iz4+VwaNG1YaZRCezc0vWNILm4LKeseBapwyjFCiXMbLbCxjjkPZmK/lK/0fwSL8egTMyLY69ScH3U7qcDxw29gtS6Ezf7qOd6Bec8g+DkeGj46VnOMRMQFKM8iqWm68YQ/wHC4gdayIy4tirqFTNAlP8CreOZD0rBsajjDlZToLsjDjty4/8wj/dJjXv64DhQ4DBXaIStBiuoE4rHNnY0WkEqT1i3YXfsRd4EaK/mqZFuJzIKbkAufudAe39AviP3qjSFUZF2OhrdL9+flasL5w0fLD4UZtOK7z35uWUnCfr17W8DblPKmZm/H/LbUqVKbZIfEEU/I7Dcsv++tbiMNt9CNg16Tf98OEBrMGz2Gc0nIx/5RHeZsUN1Ukk8RrK2ac=----ATTACHMENT:----MTkyNTMxMTI0MzQ2OTU1OCA3ODA3MTEwNzkyMjk0MTg2IDgzMDU0MzAwNDEyNTU3NjE=