public function getSystemProperties(ContainerConfigurationInterface $containerNode = null, ApplicationInterface $application = null)
    {

        // initialize the properties
        $properties = Properties::create();

        // append the system properties
        $properties->add(SystemPropertyKeys::BASE, $this->getBaseDirectory());
        $properties->add(SystemPropertyKeys::VAR_LOG, $this->getLogDir());
        $properties->add(SystemPropertyKeys::ETC, $this->getEtcDir());
        $properties->add(SystemPropertyKeys::VENDOR, $this->getVendorDir());
        $properties->add(SystemPropertyKeys::ETC_APPSERVER, $this->getConfDir());
        $properties->add(SystemPropertyKeys::ETC_APPSERVER_CONFD, $this->getConfdDir());

        // append the declared system propertie
        /** @var \AppserverIo\Appserver\Core\Api\Node\SystemPropertyNode $systemProperty */
        foreach ($this->getSystemConfiguration()->getSystemProperties() as $systemProperty) {
            $properties->add($systemProperty->getName(), $systemProperty->castToType());
        }

        // query whether or not a container node has been passed
        if ($containerNode != null) {
            // append the container specific properties
            $properties->add(SystemPropertyKeys::TMP, $this->getTmpDir($containerNode));
            $properties->add(SystemPropertyKeys::CONTAINER_NAME, $containerNode->getName());
            $properties->add(SystemPropertyKeys::WEBAPPS, $this->getWebappsDir($containerNode));

            // append the host specific system properties
            if ($host = $containerNode->getHost()) {
                $properties->add(SystemPropertyKeys::HOST_APP_BASE, $host->getAppBase());
                $properties->add(SystemPropertyKeys::HOST_TMP_BASE, $host->getTmpBase());
                $properties->add(SystemPropertyKeys::HOST_DEPLOY_BASE, $host->getDeployBase());
            }
        }

        // query whether or not an application instance has been passed
        if ($application != null) {
            // append the application specific properties
            $properties->add(SystemPropertyKeys::WEBAPP, $webappPath = $application->getWebappPath());
            $properties->add(SystemPropertyKeys::WEBAPP_NAME, basename($webappPath));
            $properties->add(SystemPropertyKeys::WEBAPP_DATA, $application->getDataDir());
            $properties->add(SystemPropertyKeys::WEBAPP_CACHE, $application->getCacheDir());
            $properties->add(SystemPropertyKeys::WEBAPP_SESSION, $application->getSessionDir());
        }

        // return the properties
        return $properties;
    }
public function getSystemProperties(ContainerConfigurationInterface $containerNode = null, ApplicationInterface $application = null)
    {

        // initialize the properties
        $properties = Properties::create();

        // append the system properties
        $properties->add(SystemPropertyKeys::BASE, $this->getBaseDirectory());
        $properties->add(SystemPropertyKeys::VAR_LOG, $this->getLogDir());
        $properties->add(SystemPropertyKeys::ETC, $this->getEtcDir());
        $properties->add(SystemPropertyKeys::VENDOR, $this->getVendorDir());
        $properties->add(SystemPropertyKeys::ETC_APPSERVER, $this->getConfDir());
        $properties->add(SystemPropertyKeys::ETC_APPSERVER_CONFD, $this->getConfdDir());

        // append the declared system propertie
        /** @var \AppserverIo\Appserver\Core\Api\Node\SystemPropertyNode $systemProperty */
        foreach ($this->getSystemConfiguration()->getSystemProperties() as $systemProperty) {
            $properties->add($systemProperty->getName(), $systemProperty->castToType());
        }

        // query whether or not a container node has been passed
        if ($containerNode != null) {
            // append the container specific properties
            $properties->add(SystemPropertyKeys::TMP, $this->getTmpDir($containerNode));
            $properties->add(SystemPropertyKeys::CONTAINER_NAME, $containerNode->getName());
            $properties->add(SystemPropertyKeys::WEBAPPS, $this->getWebappsDir($containerNode));

            // append the host specific system properties
            if ($host = $containerNode->getHost()) {
                $properties->add(SystemPropertyKeys::HOST_APP_BASE, $host->getAppBase());
                $properties->add(SystemPropertyKeys::HOST_TMP_BASE, $host->getTmpBase());
                $properties->add(SystemPropertyKeys::HOST_DEPLOY_BASE, $host->getDeployBase());
            }
        }

        // query whether or not an application instance has been passed
        if ($application != null) {
            // append the application specific properties
            $properties->add(SystemPropertyKeys::WEBAPP, $webappPath = $application->getWebappPath());
            $properties->add(SystemPropertyKeys::WEBAPP_NAME, basename($webappPath));
            $properties->add(SystemPropertyKeys::WEBAPP_DATA, $application->getDataDir());
            $properties->add(SystemPropertyKeys::WEBAPP_CACHE, $application->getCacheDir());
            $properties->add(SystemPropertyKeys::WEBAPP_SESSION, $application->getSessionDir());
        }

        // return the properties
        return $properties;
    }
public function getSystemProperties ( ContainerConfigurationInterface $ containerNode = null , ApplicationInterface $ application = null ) { // initialize the properties $ properties = Properties :: create ( ) ; // append the system properties $ properties -> add ( SystemPropertyKeys :: BASE , $ this -> getBaseDirectory ( ) ) ; $ properties -> add ( SystemPropertyKeys :: VAR_LOG , $ this -> getLogDir ( ) ) ; $ properties -> add ( SystemPropertyKeys :: ETC , $ this -> getEtcDir ( ) ) ; $ properties -> add ( SystemPropertyKeys :: VENDOR , $ this -> getVendorDir ( ) ) ; $ properties -> add ( SystemPropertyKeys :: ETC_APPSERVER , $ this -> getConfDir ( ) ) ; $ properties -> add ( SystemPropertyKeys :: ETC_APPSERVER_CONFD , $ this -> getConfdDir ( ) ) ; // append the declared system propertie /** @var \AppserverIo\Appserver\Core\Api\Node\SystemPropertyNode $systemProperty */ foreach ( $ this -> getSystemConfiguration ( ) -> getSystemProperties ( ) as $ systemProperty ) { $ properties -> add ( $ systemProperty -> getName ( ) , $ systemProperty -> castToType ( ) ) ; } // query whether or not a container node has been passed if ( $ containerNode != null ) { // append the container specific properties $ properties -> add ( SystemPropertyKeys :: TMP , $ this -> getTmpDir ( $ containerNode ) ) ; $ properties -> add ( SystemPropertyKeys :: CONTAINER_NAME , $ containerNode -> getName ( ) ) ; $ properties -> add ( SystemPropertyKeys :: WEBAPPS , $ this -> getWebappsDir ( $ containerNode ) ) ; // append the host specific system properties if ( $ host = $ containerNode -> getHost ( ) ) { $ properties -> add ( SystemPropertyKeys :: HOST_APP_BASE , $ host -> getAppBase ( ) ) ; $ properties -> add ( SystemPropertyKeys :: HOST_TMP_BASE , $ host -> getTmpBase ( ) ) ; $ properties -> add ( SystemPropertyKeys :: HOST_DEPLOY_BASE , $ host -> getDeployBase ( ) ) ; } } // query whether or not an application instance has been passed if ( $ application != null ) { // append the application specific properties $ properties -> add ( SystemPropertyKeys :: WEBAPP , $ webappPath = $ application -> getWebappPath ( ) ) ; $ properties -> add ( SystemPropertyKeys :: WEBAPP_NAME , basename ( $ webappPath ) ) ; $ properties -> add ( SystemPropertyKeys :: WEBAPP_DATA , $ application -> getDataDir ( ) ) ; $ properties -> add ( SystemPropertyKeys :: WEBAPP_CACHE , $ application -> getCacheDir ( ) ) ; $ properties -> add ( SystemPropertyKeys :: WEBAPP_SESSION , $ application -> getSessionDir ( ) ) ; } // return the properties return $ properties ; }
Returns the system proprties. If a container node has been passed,
the container properties will also be appended.

@param \AppserverIo\Psr\ApplicationServer\Configuration\ContainerConfigurationInterface|null $containerNode The container to return the system properties for
@param \AppserverIo\Psr\Application\ApplicationInterface                                     $application   The application instance

@return \AppserverIo\Properties\Properties The system properties
Returns the system proprties . If a container node has been passed the container properties will also be appended .