예제 #1
0
 /**
  * HostsFileManager constructor.
  *
  * @param Filesystem       $filesystem
  * @param ConfigRepository $configRepository
  */
 public function __construct(Filesystem $filesystem, ConfigRepository $configRepository)
 {
     $this->filesystem = $filesystem;
     $this->configRepository = $configRepository;
     $this->filePath = $this->configRepository->get('hostsfile.path');
     $this->tempDir = $this->configRepository->get('app.temporary-dir');
 }
예제 #2
0
 /**
  * Create a temporary file containing virtual host configurations
  *
  * @return bool
  */
 public function create()
 {
     $apache = $this->configRepository->get('apache');
     $defaults = $this->configRepository->get('defaults');
     $tags = array_merge($defaults, $apache);
     return $this->template->compile($this);
 }
예제 #3
0
파일: Execute.php 프로젝트: nocttuam/marvin
 /**
  * Set the Virtual Host Manager
  *
  * @param HostManager $hostManager
  */
 public function setHostManager(HostManager $hostManager)
 {
     $this->hostManager = $hostManager;
     $this->fileName = $this->hostManager->get('file-name');
 }
예제 #4
0
 public function testReturnCompleteConfigurationList()
 {
     $configRepository = new Repository($this->defaults);
     $this->assertEquals($this->defaults, $configRepository->all());
 }