basePath) { throw new Exception\RuntimeException('No base path provided'); } if (null !== $file) { $file = '/' . ltrim($file, '/'); } return $this->basePath . $file; } /** * Set the base path. * * @param string $basePath * @return self */ public function setBasePath($basePath) { $this->basePath = rtrim($basePath, '/'); return $this; } }