Exemplo n.º 1
0
 /**
  *This method merges the passed server node into this one.
  *
  * @param \AppserverIo\Appserver\Core\Api\Node\ServerNodeInterface $serverNode The server node to merge
  *
  * @return void
  */
 public function merge(ServerNodeInterface $serverNode)
 {
     // append the certificate nodes found in the passed server node
     /** @var \AppserverIo\Appserver\Core\Api\Node\CertificateNode $certificate */
     foreach ($serverNode->getCertificates() as $certificate) {
         $this->certificates[] = $certificate;
     }
     // append the virtual host nodes found in the passed server node
     /** @var \AppserverIo\Appserver\Core\Api\Node\VirtualHostNode $virtualHost */
     foreach ($serverNode->getVirtualHosts() as $virtualHost) {
         $this->virtualHosts[] = $virtualHost;
     }
     // append the location nodes found in the passed server node
     /** @var \AppserverIo\Appserver\Core\Api\Node\LocationNode $location */
     foreach ($serverNode->getLocations() as $location) {
         $this->locations[] = $location;
     }
     // append the environment variable nodes found in the passed server node
     /** @var \AppserverIo\Appserver\Core\Api\Node\EnvironmentVariableNode $environmentVariable */
     foreach ($serverNode->getEnvironmentVariables() as $environmentVariable) {
         $this->environmentVariables[] = $environmentVariable;
     }
     // append the rewrite nodes found in the passed server node
     /** @var \AppserverIo\Appserver\Core\Api\Node\RewriteNode $rewrite */
     foreach ($serverNode->getRewrites() as $rewrite) {
         $this->rewrites[] = $rewrite;
     }
     // append the access nodes found in the passed server node
     /** @var \AppserverIo\Appserver\Core\Api\Node\AccessNode $access */
     foreach ($serverNode->getAccesses() as $access) {
         $this->accesses[] = $access;
     }
 }