AppserverIo\Appserver\Core\Api\ScannerService::resolvePath PHP Méthode

resolvePath() protected méthode

Resolves the passed path. If the passed path is NULL, the webapp path is used, if the passed path is relative, the webapp path is prepended.
protected resolvePath ( string $webappPath, string $path = null ) : string
$webappPath string The absolute path to the webapp
$path string The path to be resolved
Résultat string The resolved path
    protected function resolvePath($webappPath, $path = null)
    {
        // query whether or not a base directory has been specified
        if ($path == null) {
            // set the directory where the cron.xml file located as base directory
            $path = $webappPath;
            // query whether or not we found an absolute path or not
        } elseif ($path != null) {
            if (strpos($path, '/') > 0) {
                $path = sprintf('%s/%s', $webappPath, $path);
            }
        }
        // return the resolved path
        return $path;
    }