Subdirectories are automatically parsed to correct filesystem.
For example:
$bar = getPath('root/foo/bar');
public getPathObject ( string $name ) : Eloquent\Pathogen\AbsolutePathInterface | ||
$name | string | Name of path |
return | Eloquent\Pathogen\AbsolutePathInterface |
public function testShortAliasedPaths() { $config = new ResourceManager(new \Pimple(['rootpath' => TEST_ROOT, 'pathmanager' => new PlatformFileSystemPathFactory()])); $this->assertEquals(Path::fromString(TEST_ROOT), $config->getPath('root')); $this->assertEquals(Path::fromString(TEST_ROOT), $config->getPath('rootpath')); $this->assertEquals(Path::fromString(TEST_ROOT . '/app'), $config->getPath('app')); $this->assertEquals(Path::fromString(TEST_ROOT . '/files'), $config->getPath('files')); $this->assertInstanceOf('Eloquent\\Pathogen\\PathInterface', $config->getPathObject('root')); }