Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UriRetriever.php

function UriRetriever::generate

Builds a URI based on n array with the main components

Parameters

array $components:

Return value

string

1 call to UriRetriever::generate()
UriRetriever::resolve in vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php
Resolves a URI

File

vendor/justinrainbow/json-schema/src/JsonSchema/Uri/UriRetriever.php, line 273

Class

UriRetriever
Retrieves JSON Schema URIs

Namespace

JsonSchema\Uri

Code

public function generate(array $components) {
    $uri = $components['scheme'] . '://' . $components['authority'] . $components['path'];
    if (array_key_exists('query', $components)) {
        $uri .= $components['query'];
    }
    if (array_key_exists('fragment', $components)) {
        $uri .= $components['fragment'];
    }
    return $uri;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal