[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/vendor/joomla/uri/src/ -> UriInterface.php (source)

   1  <?php
   2  /**
   3   * Part of the Joomla Framework Uri Package
   4   *
   5   * @copyright  Copyright (C) 2005 - 2022 Open Source Matters, Inc. All rights reserved.
   6   * @license    GNU General Public License version 2 or later; see LICENSE
   7   */
   8  
   9  namespace Joomla\Uri;
  10  
  11  /**
  12   * Uri Interface
  13   *
  14   * Interface for read-only access to URIs.
  15   *
  16   * @since  1.0
  17   */
  18  interface UriInterface
  19  {
  20      /**
  21       * Include the scheme (http, https, etc.)
  22       *
  23       * @var    integer
  24       * @since  1.2.0
  25       */
  26      public const SCHEME = 1;
  27  
  28      /**
  29       * Include the user
  30       *
  31       * @var    integer
  32       * @since  1.2.0
  33       */
  34      public const USER = 2;
  35  
  36      /**
  37       * Include the password
  38       *
  39       * @var    integer
  40       * @since  1.2.0
  41       */
  42      public const PASS = 4;
  43  
  44      /**
  45       * Include the host
  46       *
  47       * @var    integer
  48       * @since  1.2.0
  49       */
  50      public const HOST = 8;
  51  
  52      /**
  53       * Include the port
  54       *
  55       * @var    integer
  56       * @since  1.2.0
  57       */
  58      public const PORT = 16;
  59  
  60      /**
  61       * Include the path
  62       *
  63       * @var    integer
  64       * @since  1.2.0
  65       */
  66      public const PATH = 32;
  67  
  68      /**
  69       * Include the query string
  70       *
  71       * @var    integer
  72       * @since  1.2.0
  73       */
  74      public const QUERY = 64;
  75  
  76      /**
  77       * Include the fragment
  78       *
  79       * @var    integer
  80       * @since  1.2.0
  81       */
  82      public const FRAGMENT = 128;
  83  
  84      /**
  85       * Include all available url parts (scheme, user, pass, host, port, path, query, fragment)
  86       *
  87       * @var    integer
  88       * @since  1.2.0
  89       */
  90      public const ALL = 255;
  91  
  92      /**
  93       * Magic method to get the string representation of the URI object.
  94       *
  95       * @return  string
  96       *
  97       * @since   1.0
  98       */
  99  	public function __toString();
 100  
 101      /**
 102       * Returns full URI string.
 103       *
 104       * @param   array  $parts  An array of strings specifying the parts to render.
 105       *
 106       * @return  string  The rendered URI string.
 107       *
 108       * @since   1.0
 109       */
 110  	public function toString($parts = ['scheme', 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment']);
 111  
 112      /**
 113       * Checks if variable exists.
 114       *
 115       * @param   string  $name  Name of the query variable to check.
 116       *
 117       * @return  boolean  True if the variable exists.
 118       *
 119       * @since   1.0
 120       */
 121  	public function hasVar($name);
 122  
 123      /**
 124       * Returns a query variable by name.
 125       *
 126       * @param   string  $name     Name of the query variable to get.
 127       * @param   string  $default  Default value to return if the variable is not set.
 128       *
 129       * @return  mixed  Requested query variable if present otherwise the default value.
 130       *
 131       * @since   1.0
 132       */
 133  	public function getVar($name, $default = null);
 134  
 135      /**
 136       * Returns flat query string.
 137       *
 138       * @param   boolean  $toArray  True to return the query as a key => value pair array.
 139       *
 140       * @return  array|string   Query string, optionally as an array.
 141       *
 142       * @since   1.0
 143       */
 144  	public function getQuery($toArray = false);
 145  
 146      /**
 147       * Get the URI scheme (protocol)
 148       *
 149       * @return  string  The URI scheme.
 150       *
 151       * @since   1.0
 152       */
 153  	public function getScheme();
 154  
 155      /**
 156       * Get the URI username
 157       *
 158       * @return  string  The username, or null if no username was specified.
 159       *
 160       * @since   1.0
 161       */
 162  	public function getUser();
 163  
 164      /**
 165       * Get the URI password
 166       *
 167       * @return  string  The password, or null if no password was specified.
 168       *
 169       * @since   1.0
 170       */
 171  	public function getPass();
 172  
 173      /**
 174       * Get the URI host
 175       *
 176       * @return  string  The hostname/IP or null if no hostname/IP was specified.
 177       *
 178       * @since   1.0
 179       */
 180  	public function getHost();
 181  
 182      /**
 183       * Get the URI port
 184       *
 185       * @return  integer  The port number, or null if no port was specified.
 186       *
 187       * @since   1.0
 188       */
 189  	public function getPort();
 190  
 191      /**
 192       * Gets the URI path string
 193       *
 194       * @return  string  The URI path string.
 195       *
 196       * @since   1.0
 197       */
 198  	public function getPath();
 199  
 200      /**
 201       * Get the URI archor string
 202       *
 203       * @return  string  The URI anchor string.
 204       *
 205       * @since   1.0
 206       */
 207  	public function getFragment();
 208  
 209      /**
 210       * Checks whether the current URI is using HTTPS.
 211       *
 212       * @return  boolean  True if using SSL via HTTPS.
 213       *
 214       * @since   1.0
 215       */
 216  	public function isSsl();
 217  }


Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer