|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<refentry xml:id="uri-rfc3986-uri.equals" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> |
| 3 | + <refnamediv> |
| 4 | + <refname>Uri\Rfc3986\Uri::equals</refname> |
| 5 | + <refpurpose>Check if two URIs are equivalent</refpurpose> |
| 6 | + </refnamediv> |
| 7 | + |
| 8 | + <refsect1 role="description"> |
| 9 | + &reftitle.description; |
| 10 | + <methodsynopsis role="Uri\\Rfc3986\\Uri"> |
| 11 | + <modifier>public</modifier> <type>bool</type><methodname>Uri\Rfc3986\Uri::equals</methodname> |
| 12 | + <methodparam><type>Uri\Rfc3986\Uri</type><parameter>uri</parameter></methodparam> |
| 13 | + <methodparam choice="opt"><type>Uri\UriComparisonMode</type><parameter>comparisonMode</parameter><initializer><constant>Uri\UriComparisonMode::ExcludeFragment</constant></initializer></methodparam> |
| 14 | + </methodsynopsis> |
| 15 | + <simpara> |
| 16 | + Checks if two URIs are equivalent. |
| 17 | + </simpara> |
| 18 | + </refsect1> |
| 19 | + |
| 20 | + <refsect1 role="parameters"> |
| 21 | + &reftitle.parameters; |
| 22 | + <variablelist> |
| 23 | + <varlistentry> |
| 24 | + <term><parameter>uri</parameter></term> |
| 25 | + <listitem> |
| 26 | + <simpara> |
| 27 | + URI to compare the current URI against. |
| 28 | + </simpara> |
| 29 | + </listitem> |
| 30 | + </varlistentry> |
| 31 | + <varlistentry> |
| 32 | + <term><parameter>comparisonMode</parameter></term> |
| 33 | + <listitem> |
| 34 | + <simpara> |
| 35 | + Whether the fragment component is taken into account of the comparison |
| 36 | + (<literal>Uri\UriComparisonMode::IncludeFragment</literal>) or not |
| 37 | + (<literal>Uri\UriComparisonMode::ExcludeFragment</literal>). By default, the fragment is excluded. |
| 38 | + </simpara> |
| 39 | + </listitem> |
| 40 | + </varlistentry> |
| 41 | + </variablelist> |
| 42 | + </refsect1> |
| 43 | + |
| 44 | + <refsect1 role="returnvalues"> |
| 45 | + &reftitle.returnvalues; |
| 46 | + <simpara> |
| 47 | + Returns &true; if the two URIs are equivalent, or &false; otherwise. |
| 48 | + </simpara> |
| 49 | + </refsect1> |
| 50 | + |
| 51 | + <refsect1 role="examples"> |
| 52 | + &reftitle.examples; |
| 53 | + <example xml:id="uri-rfc3986-uri.equals.example.basic"> |
| 54 | + <title><methodname>Uri\Rfc3986\Uri::equals</methodname> basic example</title> |
| 55 | + <programlisting role="php"> |
| 56 | +<![CDATA[ |
| 57 | +<?php |
| 58 | +$uri1 = new \Uri\Rfc3986\Uri("https://example.com"); |
| 59 | +$uri2 = new \Uri\Rfc3986\Uri("HTTPS://example.com"); |
| 60 | +
|
| 61 | +var_dump($uri1->equals($uri2)); |
| 62 | +?> |
| 63 | +]]> |
| 64 | + </programlisting> |
| 65 | + &example.outputs; |
| 66 | + <screen> |
| 67 | +<![CDATA[ |
| 68 | +bool(true) |
| 69 | +]]> |
| 70 | + </screen> |
| 71 | + </example> |
| 72 | + </refsect1> |
| 73 | + |
| 74 | + <refsect1 role="seealso"> |
| 75 | + &reftitle.seealso; |
| 76 | + <simplelist> |
| 77 | + <member><methodname>Uri\WhatWg\Url::equals</methodname></member> |
| 78 | + </simplelist> |
| 79 | + </refsect1> |
| 80 | +</refentry> |
| 81 | +<!-- Keep this comment at the end of the file |
| 82 | +Local variables: |
| 83 | +mode: sgml |
| 84 | +sgml-omittag:t |
| 85 | +sgml-shorttag:t |
| 86 | +sgml-minimize-attributes:nil |
| 87 | +sgml-always-quote-attributes:t |
| 88 | +sgml-indent-step:1 |
| 89 | +sgml-indent-data:t |
| 90 | +indent-tabs-mode:nil |
| 91 | +sgml-parent-document:nil |
| 92 | +sgml-default-dtd-file:"~/.phpdoc/manual.ced" |
| 93 | +sgml-exposed-tags:nil |
| 94 | +sgml-local-catalogs:nil |
| 95 | +sgml-local-ecat-files:nil |
| 96 | +End: |
| 97 | +vim600: syn=xml fen fdm=syntax fdl=2 si |
| 98 | +vim: et tw=78 syn=sgml |
| 99 | +vi: ts=1 sw=1 |
| 100 | +--> |
0 commit comments