コード例 #1
0
ファイル: ResourceManager.php プロジェクト: nectd/nectd-web
 /**
  * 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;
 }
コード例 #2
0
 /**
  * Create a new instance of the default path factory.
  *
  * @return PathFactoryInterface The new default path factory instance.
  */
 protected function createDefaultPathFactory()
 {
     return FileSystemPathFactory::instance();
 }
コード例 #3
0
ファイル: FileSystemPath.php プロジェクト: kylesm87/Clutch
 /**
  * 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();
 }