projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da37ead
)
Civi\Core\Url - Also support JSON serialization
author
Tim Otten
<totten@civicrm.org>
Tue, 25 Jul 2023 01:23:14 +0000
(18:23 -0700)
committer
Tim Otten
<totten@civicrm.org>
Tue, 25 Jul 2023 03:15:45 +0000
(20:15 -0700)
Civi/Core/Url.php
patch
|
blob
|
blame
|
history
diff --git
a/Civi/Core/Url.php
b/Civi/Core/Url.php
index da014967ff5087c6a32a4998d0dc704652823213..69ab20db081d9d65e7ddddf65b41fb9aad4c6922 100644
(file)
--- a/
Civi/Core/Url.php
+++ b/
Civi/Core/Url.php
@@
-33,7
+33,7
@@
namespace Civi\Core;
* This cl
* @see \Civi::url()
*/
-final class Url {
+final class Url
implements \JsonSerializable
{
/**
* @var string
@@
-560,6
+560,11
@@
final class Url {
return $this->htmlEscape ? htmlentities($result) : $result;
}
+ #[\ReturnTypeWillChange]
+ public function jsonSerialize() {
+ return $this->__toString();
+ }
+
private function composeSuffix(): string {
$result = '';
if ($this->query !== NULL && $this->query !== '') {