/** * Determine layout, cached. * * @return xp.scriptlet.WebLayout */ private function determineLayout() { if (null === $this->layout) { $ini = new Path($this->webroot, WebConfiguration::INI); if ($ini->exists()) { $this->layout = new WebConfiguration(new Properties($ini->toString()), $this->config); } else { $ini = new Path($this->webroot, 'etc', WebConfiguration::INI); if ($ini->exists()) { $this->layout = new WebConfiguration(new Properties($ini->toString()), $this->config); } else { $this->layout = new ServeDocumentRootStatically(); } } } return $this->layout; }
/** * Add a single file to the archive, and print out the name if verbose option is set. * * @param io.Path $target Zarh in archive * @param io.Path $source Path to source file * @return void */ protected function add($target, $source) { $name = $target->toString('/'); $this->options & Options::VERBOSE && $this->out->writeLine($name); $this->archive->addFile($name, $source->asFile()); }