Formats a string containing the fully-qualified path to represent
a cluster resource.

@param string $project
@param string $instance
@param string $cluster

@return string The formatted cluster resource.
@experimental
544956
public static function clusterName($project, $instance, $cluster)
    {
        return self::getClusterNameTemplate()->render([
            'project' => $project,
            'instance' => $instance,
            'cluster' => $cluster,
        ]);
    }
452195
public static function indexName($project, $database, $collectionId, $indexId)
    {
        return self::getIndexNameTemplate()->render([
            'project' => $project,
            'database' => $database,
            'collection_id' => $collectionId,
            'index_id' => $indexId,
        ]);
    }
716689
protected function _buildPath($record, $extension = true, $hash = null) {
		if ($this->_config['pathBuilderOptions']['preserveFilename'] === true) {
			if (!empty($hash)) {
				$path = $record['path'] . preg_replace('/\.[^.]*$/', '', $record['filename']) . '.' . $hash . '.' . $record['extension'];
			} else {
				$path = $record['path'] . $record['filename'];
			}
		} else {
			$path = $record['path'] . str_replace('-', '', $record['id']);
			if (!empty($hash)) {
				$path .= '.' . $hash;
			}
			if ($extension === true) {
				$path .= '.' . $record['extension'];
			}
		}

		if ($this->adapterClass === 'AmazonS3' || $this->adapterClass === 'AwsS3') {
			return str_replace('\\', '/', $path);
		}

		return $path;
	}
1167906
@InternalApi
  public com.google.bigtable.admin.v2.CreateInstanceRequest toProto(String projectId) {
    builder.setParent(NameUtil.formatProjectName(projectId)).clearClusters();

    for (CreateClusterRequest clusterRequest : clusterRequests) {
      builder.putClusters(clusterRequest.getClusterId(), clusterRequest.toEmbeddedProto(projectId));
    }

    return builder.build();
  }
21780
protected function initializeEnvironment(
        ProjectDescriptor $project,
        Transformation $transformation,
        string $destination
    ): Twig_Environment {
        $callingTemplatePath = $this->getTemplatePath($transformation);

        $baseTemplatesPath = $transformation->getTransformer()->getTemplates()->getTemplatesPath();

        $templateFolders = [
            $baseTemplatesPath . '/..' . DIRECTORY_SEPARATOR . $callingTemplatePath,
            // http://twig.sensiolabs.org/doc/recipes.html#overriding-a-template-that-also-extends-itself
            $baseTemplatesPath,
        ];

        // get all invoked template paths, they overrule the calling template path
        /** @var \phpDocumentor\Transformer\Template $template */
        foreach ($transformation->getTransformer()->getTemplates() as $template) {
            $path = $baseTemplatesPath . DIRECTORY_SEPARATOR . $template->getName();
            array_unshift($templateFolders, $path);
        }

        // Clone twig because otherwise we cannot re-set the extensions on this twig environment on every run of this
        // writer
        $env = clone $this->twig;
        $env->setLoader(new Twig_Loader_Filesystem($templateFolders));

        $this->addPhpDocumentorExtension($project, $transformation, $destination, $env);
        $this->addExtensionsFromTemplateConfiguration($transformation, $project, $env);

        return $env;
    }
1361651
public static function getProjectRootDirectory(): string
    {
        if (null === self::$projectRootDirectory) {
            $reflection                 = new \ReflectionClass(ClassLoader::class);
            self::$projectRootDirectory = \dirname((string)$reflection->getFileName(), 3);
        }

        return self::$projectRootDirectory;
    }
1002933
def instance_path(cls, project, instance):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/instances/{instance}",
            project=project,
            instance=instance,
        )
163459
public OvhInstanceGroup project_serviceName_instance_group_POST(String serviceName, String name, String region, OvhInstanceGroupTypeEnum type) throws IOException {
		String qPath = "/cloud/project/{serviceName}/instance/group";
		StringBuilder sb = path(qPath, serviceName);
		HashMap<String, Object>o = new HashMap<String, Object>();
		addBody(o, "name", name);
		addBody(o, "region", region);
		addBody(o, "type", type);
		String resp = exec(qPath, "POST", sb.toString(), o);
		return convertTo(resp, OvhInstanceGroup.class);
	}
116867
protected function getProjectStructureXml($project, $ref = null)
    {
        if(!$project instanceof Project){
            $project = $this->codex->projects->get($project);
        }

        $ref = $ref === null ? $project->refs->getDefaultName() : $ref;

        $xmlPath = path_join($ref, $project->config('phpdoc.xml_path'));
        return $project->getFiles()->get($xmlPath);
    }
124914
public String getInstancesNodeFullPath(final String instanceId) {
        return Joiner.on("/").join("", name, ROOT, INSTANCES_NODE_PATH, instanceId);
    }
593671
def document_path_path(cls, project, database, document_path):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/databases/{database}/documents/{document_path=**}",
            project=project,
            database=database,
            document_path=document_path,
        )
165257
public static function &getPlatform($platform, $instance)
	{
		static $instances;
		if (!isset($instances)) {
			$instances = array();
		}

		$platform = ucfirst(strtolower($platform));

		//only create a new thread instance if it has not been created before
		if (!isset($instances[$platform][$instance])) {
			$name = static::getNameFromInstance($instance);

			static::pluginAutoLoad($name);

			$class = '\JFusion\Plugins\\' . $name . '\Platform\\' . $platform . '\\Platform';
			if (!class_exists($class)) {
				$class = '\JFusion\Plugin\Platform\\' . $platform;
			}
			if (!class_exists($class)) {
				$class = '\JFusion\Plugin\Platform';
			}
			$instances[$platform][$instance] = new $class($instance);
		}
		return $instances[$platform][$instance];
	}
495359
public static String lookupInstanceId(String projectId, String clusterId, String zoneId)
    throws IOException {
    BigtableClusterUtilities utils;
    try {
      utils = BigtableClusterUtilities.forAllInstances(projectId);
    } catch (GeneralSecurityException e) {
      throw new RuntimeException("Could not initialize BigtableClusterUtilities", e);
    }

    try {
      Cluster cluster = utils.getCluster(clusterId, zoneId);
      return new BigtableClusterName(cluster.getName()).getInstanceId();
    } finally {
      try {
        utils.close();
      } catch (Exception e) {
        logger.warn("Error closing BigtableClusterUtilities: ", e);
      }
    }
  }
1061369
public static String formatAsDirectory(final String dotSep) {
        if (dotSep == null || "".equals(dotSep)) {
            return "";
        }
        return dotSep.replace(GROUP_SEPARATOR, PATH_SEPARATOR);
    }
1037322
private static String normalizeClusterUrl(String clusterIdentifier) {
    try {
      URI uri = new URI(clusterIdentifier.trim());
      // URIs without protocol prefix
      if (!uri.isOpaque() && null != uri.getHost()) {
        clusterIdentifier = uri.getHost();
      } else {
        clusterIdentifier = uri.toString().replaceAll("[/:]"," ").trim().replaceAll(" ", "_");
      }
    } catch (URISyntaxException e) {
      //leave ID as is
    }

    return clusterIdentifier;
  }
226400
public static String findInstanceName( String instancePath ) {

		String instanceName = "";
		Matcher m = Pattern.compile( "([^/]+)$" ).matcher( instancePath );
		if( m.find())
			instanceName = m.group( 1 );

		return instanceName;
	}
431958
def session_path(cls, project, instance, database, session):
        """"""
        return google.api_core.path_template.expand(
            "projects/{project}/instances/{instance}/databases/{database}/sessions/{session}",
            project=project,
            instance=instance,
            database=database,
            session=session,
        )