コード例 #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;
 }