Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

SiteAccess.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\MVC\Symfony;
8
9 use eZ\Publish\API\Repository\Values\ValueObject;
10 use JsonSerializable;
11
15 class SiteAccess extends ValueObject implements JsonSerializable
16 {
22 public $name;
23
30 public $matchingType;
31
37 public $matcher;
38
39 public function __construct($name = null, $matchingType = null, $matcher = null)
40 {
41 $this->name = $name;
42 $this->matchingType = $matchingType;
43 $this->matcher = $matcher;
44 }
45
46 public function __toString()
47 {
48 return "$this->name (matched by '$this->matchingType')";
49 }
50
51 public function jsonSerialize()
52 {
53 $matcher = is_object($this->matcher) ? get_class($this->matcher) : null;
54
55 return [
56 'name' => $this->name,
57 'matchingType' => $this->matchingType,
58 'matcher' => $matcher,
59 ];
60 }
61 }
eZ\Publish\API\Repository\Values\ValueObject
Definition: API/Repository/Values/ValueObject.php:21
eZ\Publish\Core\MVC\Symfony\SiteAccess
Base struct for a siteaccess representation.
Definition: SiteAccess.php:16
eZ\Publish\Core\MVC\Symfony\SiteAccess\jsonSerialize
jsonSerialize()
Definition: SiteAccess.php:51
eZ\Publish\Core\MVC\Symfony\SiteAccess\$matcher
$matcher
Definition: SiteAccess.php:37
eZ\Publish\Core\MVC\Symfony\SiteAccess\$matchingType
$matchingType
Definition: SiteAccess.php:30
eZ\Publish\Core\MVC\Symfony\SiteAccess\__toString
__toString()
Definition: SiteAccess.php:46
eZ\Publish\Core\MVC\Symfony\SiteAccess\$name
$name
Definition: SiteAccess.php:22
eZ\Publish\Core\MVC\Symfony\SiteAccess\__construct
__construct($name=null, $matchingType=null, $matcher=null)
Definition: SiteAccess.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.