/** * Set a resource path. * * @param string $name * @param string $value * * @return \Eloquent\Pathogen\RelativePathInterface|\Eloquent\Pathogen\AbsolutePathInterface */ public function setPath($name, $value) { // If this is a relative path make it relative to root. $path = $this->pathManager->create($value); if ($path instanceof RelativePathInterface) { $path = $path->resolveAgainst($this->paths['root']); } $this->paths[$name] = $path; if (strpos($name, 'path') === false) { $this->paths[$name . 'path'] = $path; } return $path; }
/** * Create a new instance of the default path factory. * * @return PathFactoryInterface The new default path factory instance. */ protected function createDefaultPathFactory() { return FileSystemPathFactory::instance(); }
/** * Get the most appropriate path factory for this type of path. * * @return Factory\FileSystemPathFactoryInterface The path factory. */ protected static function factory() { return Factory\FileSystemPathFactory::instance(); }