예제 #1
0
 public function getLinkForVhost($vhostName)
 {
     $baseDir = $this->globalConfiguration->getVhostsDirectory();
     if (!is_dir($baseDir)) {
         throw new NotADirectoryException($baseDir);
     }
     $linkName = $baseDir . '/' . $vhostName;
     if (!is_link($linkName) && file_exists($linkName)) {
         throw new NotALinkException($linkName);
     }
     return $linkName;
 }
예제 #2
0
 public function getLink()
 {
     $link = new \SplFileInfo($this->globalConfiguration->getVhostsDirectory() . '/' . $this->getName());
     OutsideConfiguredRootDirectoryException::assert($link->getPathname(), 'vhosts-dir', $this->globalConfiguration->getVhostsDirectory());
     return $link;
 }