Returns service constant path, with provider, as string. If
 "provider::service" is defined (the preferred format) then it returns that
 string, otherwise it returns the deprecated string "service::provider".
495182
def service_klass(constant_string)
      eval([to_s, constant_string].join("::"))
      [to_s, constant_string].join("::")
    rescue NameError
      provider = to_s.split("::").last
      Fog::Logger.deprecation("Unable to load #{[to_s, constant_string].join("::")}")
      Fog::Logger.deprecation(
        format(
          Fog::ServicesMixin::E_SERVICE_PROVIDER_CONSTANT,
          service: constant_string,
          provider: provider
        )
      )
      ['Fog', constant_string, provider].join("::")
    end
1217174
def _get_service_provider(self):
        
        service_class = self._spec.get('service_class', None)
        if service_class is not None:
            warnings.warn(
                'The service_class key for a domain is deprecated, you should '
                'change it to service_provider instead'
            )
            service_provider = _resolve_service_class(
                class_name=service_class,
                service_providers=self.service_providers,
            )
        else:
            service_provider = self.service_providers.get(
                self._spec.get('service_provider', None),
                None,
            )

        return service_provider
450887
public static String toUrl(ProviderInfo providerInfo) {
        String uri = providerInfo.getProtocolType() + "://" + providerInfo.getHost() + ":" + providerInfo.getPort();
        uri += StringUtils.trimToEmpty(providerInfo.getPath());
        StringBuilder sb = new StringBuilder();
        if (providerInfo.getRpcVersion() > 0) {
            sb.append("&").append(ProviderInfoAttrs.ATTR_RPC_VERSION).append("=").append(providerInfo.getRpcVersion());
        }
        if (providerInfo.getSerializationType() != null) {
            sb.append("&").append(ProviderInfoAttrs.ATTR_SERIALIZATION).append("=")
                .append(providerInfo.getSerializationType());
        }
        for (Map.Entry<String, String> entry : providerInfo.getStaticAttrs().entrySet()) {
            sb.append("&").append(entry.getKey()).append("=").append(entry.getValue());
        }
        if (sb.length() > 0) {
            uri += sb.replace(0, 1, "?").toString();
        }
        return uri;
    }
532984
function routePath (route) {
  if (!route) return ''
  return route.path || (route.regexp && route.regexp.source) || ''
}
1344493
def qualified_const_get(x)
      x = x.to_s
      if !x.match(/::/)
        Object.const_get(x)
      else
        x.split(MODULE_SEPARATOR).reject(&:empty?).inject(Object) { |a, e| a.const_get(e) }
      end
    rescue NameError # There's no way to safely ask if a constant exist for an unknown string
      nil
    end
668320
public function getFullPath($format = Path::FORMAT_NO_DELIMITERS)
	{
		$pathString = $this->getPath()
				->getFullPath($format);

		return $pathString;
	}
710767
public function getPath() : string
    {
        if ($this->fullPath !== null) {
            return $this->fullPath;
        }

        $path = $this->getSetting('path');

        if (is_dir($path)) {
            $this->verified = true;

            return $this->fullPath = realpath($path);
        }

        $pubPath = public_path(trim($path, '/'));

        $this->verified = is_dir($pubPath);

        return $this->fullPath = $pubPath;
    }
521027
def get_str(self, key, default=None):
        
        if key:
            for provider in self.providers:
                value = provider.get_str(key)
                if value is not None:
                    return value

        return default
742229
public function getDataFixturesDirectoryPath(): ?string
    {
        $path = $this->getPath();

        if (empty($path)) {
            return null;
        }

        return Miscellaneous::concatenatePaths([
            $path,
            static::PATH_DATA_FIXTURES,
        ]);
    }
659598
public function getCachedServicesPath()
    {
        $path = $this->optimizer->getCachedServicesPath();

        if ($path) {
            return $path;
        }

        if ($this->isRunningOnGae()) {
            return $this->storagePath().'/framework/services.json';
        }

        return parent::getCachedServicesPath();
    }
1136654
public static function provider($package)
    {
        $location = __DIR__.'/../../'.$package.'/src';

        $files = is_dir($location) ? scandir($location) : [];

        foreach ($files as $file) {
            if (strpos($file, 'ServiceProvider') !== false) {
                return str_replace('.php', '', $file);
            }
        }

        return false;
    }
652893
public function getDsn()
    {
        if (!$this->config) {
            return '';
        }
        $dsn = array();
        $path = null;

        if ($this->config->getName()) {
            $path = $this->config->getName();
        }

        if ($this->config->getPath()) {
            $path = $this->config->getPath();
        }

        if ($this->config->getHost()) {
            if ($this->config->getPort()) {
                $dsn[] = sprintf('dbname=%s/%s:%s',
                    $this->config->getHost(),
                    $this->config->getPort(),
                    $path
                );
            } else {
                $dsn[] = sprintf('dbname=%s:%s',
                    $this->config->getHost(),
                    $path
                );
            }
        } else {
            $dsn[] = 'dbname='.$path;
        }

        if ($this->config->getRole()) {
            $dsn[] = 'role='.$this->config->getRole();
        }

        if ($this->config->getChar()) {
            $dsn[] = 'charset='.$this->config->getChar();
        }

        return $this->getPrefix().implode(';', $dsn);
    }
742157
private static String normalizePath(final Service service) {
        var path = service.getId();
        path = StringUtils.substringBefore(path, "?");
        path = StringUtils.substringBefore(path, ";");
        path = StringUtils.substringBefore(path, "#");
        return path;
    }
1001654
public function ToString( $provider = null )
	{
		$result = "";
		if ( $this->S ) $result .= "-";
		if ( $this->IsLocal )
			$result .= $this->Value->format("--m-d");
		else
			if ( $this->Value->getOffset() == 0 )
				$result .= $this->Value->format("--m-d\Z");
			else
				$result .= $this->Value->format("--m-dP");

		return $result;
	}
1271200
private String makeUrlPath(String servicePath) {
		if (null == servicePath || 0 == servicePath.length()) {
			throw new IllegalArgumentException("the service path must be provided");
		}
		
		if ('/' == servicePath.charAt(0)) {
			return servicePath;
		}
		
		return PATH_PREFIX.concat(servicePath);
	}
1151090
public function getPath() : ?string 
    {
        if ( ! $this->hasPath()) {
            $this->setPath($this->getDefaultPath());
        }
        return $this->path;
    }
270508
protected function _getServicePath()
    {
        if (isset($this->_options['server'])) {
            return $this->_options['server']->getDirectory();
        }

        if (isset($this->_options['directories'])) {
            return $this->_options['directories'];
        }

        return array();
    }