示例#1
0
 /**
  * Adds the .dodeploy flag file in the deploy folder, therefore the
  * app will be deployed with the next restart.
  *
  * @param \AppserverIo\Appserver\Core\Api\Node\ContainerInterface $containerNode The container the app is bound to
  * @param \AppserverIo\Configuration\Interfaces\NodeInterface     $appNode       The application node object
  *
  * @return void
  */
 public function deploy(ContainerNodeInterface $containerNode, NodeInterface $appNode)
 {
     // prepare file name
     $extractor = $this->getExtractor();
     $fileName = $appNode->getName() . $extractor->getExtensionSuffix();
     // load the file info
     $archive = new \SplFileInfo($this->getDeployDir($containerNode) . DIRECTORY_SEPARATOR . $fileName);
     // flag the archive => deploy it with the next restart
     $extractor->flagArchive($archive, ExtractorInterface::FLAG_DODEPLOY);
 }