AppserverIo\Appserver\Core\Api\DeploymentService::prepareSystemProperties PHP Метод

prepareSystemProperties() защищенный Метод

Prepares the system properties for the actual mode.
protected prepareSystemProperties ( AppserverIo\Properties\PropertiesInterface $properties, string $webappPath ) : void
$properties AppserverIo\Properties\PropertiesInterface The properties to prepare
$webappPath string The path of the web application to prepare the properties with
Результат void
    protected function prepareSystemProperties(PropertiesInterface $properties, $webappPath)
    {
        // append the application specific properties and replace the properties
        $properties->add(SystemPropertyKeys::WEBAPP, $webappPath);
        $properties->add(SystemPropertyKeys::WEBAPP_NAME, basename($webappPath));
    }

Usage Example

 /**
  * Prepare's the system properties for the actual mode, which is the runner mode in our case.
  *
  * @param \AppserverIo\Properties\PropertiesInterface $properties The properties to prepare
  * @param string                                      $webappPath The path of the web application to prepare the properties with
  *
  * @return void
  */
 protected function prepareSystemProperties(PropertiesInterface $properties, $webappPath)
 {
     // let the parent method also prepare the properties
     parent::prepareSystemProperties($properties, $webappPath);
     // replace the host's application base directory with the parent directory
     $properties->add(SystemPropertyKeys::HOST_APP_BASE, dirname($webappPath));
 }