summaryrefslogtreecommitdiffstats
path: root/core/lib/Drupal/Core/GeneratedUrl.php
blob: f3bf6581d0f0c76b53d48308ea72de1e988db2f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

namespace Drupal\Core;

use Drupal\Core\Render\BubbleableMetadata;

/**
 * Used to return generated URLs, along with associated bubbleable metadata.
 *
 * Note: not to be confused with \Drupal\Core\Url, which is for passing around
 *   ungenerated URLs (typically route name + route parameters).
 */
class GeneratedUrl extends BubbleableMetadata {

  /**
   * The string value of the URL.
   *
   * @var string
   */
  protected $generatedUrl = '';

  /**
   * Gets the generated URL.
   *
   * @return string
   */
  public function getGeneratedUrl() {
    return $this->generatedUrl ;
  }

  /**
   * Sets the generated URL.
   *
   * @param string $generated_url
   *   The generated URL.
   *
   * @return $this
   */
  public function setGeneratedUrl($generated_url) {
    $this->generatedUrl = $generated_url;
    return $this;
  }

}