/** * Extends the current instance with a new base directory. * * @param string $basedir Optional base directory */ public function extend($basedir = null, $overwrite = false) { if (null === $basedir) { $basedir = $this->basedir; } $basedir = File::realpath($basedir); if (false === $this->loadFromCache($basedir)) { $this->loadFromBaseDir($basedir, $overwrite); $this->saveToCache($basedir); } if (!empty($this->environment) && false === strpos($this->environment, $basedir) && is_dir($basedir . DIRECTORY_SEPARATOR . $this->environment)) { $this->extend($basedir . DIRECTORY_SEPARATOR . $this->environment, $overwrite); } return $this; }
/** * @link http://php.net/manual/en/function.parse-url.php */ public function testRealPathWithoutScheme() { $this->assertFalse(File::realpath('//www.example.com/path?googleguy=googley')); }