public function getPath($path) { if (($basePath = $this->getBasePath()) !== null) { return $basePath . DIRECTORY_SEPARATOR . ltrim($path, '/\\'); } else { throw new InvalidConfigException('The "basePath" property must be set.'); } }