/**
  * Return's the prepared server node configuration.
  *
  * @param \AppserverIo\Appserver\Core\Api\Node\ServerNodeInterface $serverNode The server node
  *
  * @return \AppserverIo\Appserver\Core\ServerNodeConfiguration The server node configuration
  */
 protected function getServerNodeConfiguration(ServerNodeInterface $serverNode)
 {
     // override the document root
     $serverNode->setParam('documentRoot', ParamNode::TYPE_STRING, getcwd());
     // add the server node configuration
     return parent::getServerNodeConfiguration($serverNode);
 }
Beispiel #2
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;
     }
 }
 /**
  * Return's the prepared server node configuration.
  *
  * @param \AppserverIo\Appserver\Core\Api\Node\ServerNodeInterface $serverNode The server node
  *
  * @return \AppserverIo\Appserver\Core\ServerNodeConfiguration The server node configuration
  */
 protected function getServerNodeConfiguration(ServerNodeInterface $serverNode)
 {
     // query whether a server signature (software) has been configured
     if ($serverNode->getParam('software') == null) {
         $serverNode->setParam('software', ParamNode::TYPE_STRING, $this->getService()->getServerSignature());
     }
     // add the server node configuration
     return new ServerNodeConfiguration($serverNode);
 }
 /**
  * Attaches the passed server node.
  *
  * @param \AppserverIo\Appserver\Core\Api\Node\ServerNodeInterface $server The server node to attach
  *
  * @return void
  */
 public function attachServer(ServerNodeInterface $server)
 {
     $this->servers[$server->getPrimaryKey()] = $server;
 }
 /**
  * Returns stream context type
  *
  * @return string
  */
 public function getStreamContextType()
 {
     return $this->node->getStreamContext();
 }