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

Core/Repository/Values/Content/Location.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\Core\Repository\Values\Content;
8
9 use eZ\Publish\API\Repository\Values\Content\Location as APILocation;
10
16 class Location extends APILocation
17 {
23 protected $contentInfo;
24
26 protected $path;
27
33 public function getContentInfo()
34 {
35 return $this->contentInfo;
36 }
37
49 protected function getProperties($dynamicProperties = ['contentId'])
50 {
51 return parent::getProperties($dynamicProperties);
52 }
53
61 public function __get($property)
62 {
63 switch ($property) {
64 case 'contentId':
65 return $this->contentInfo->id;
66 case 'path':
67 if ($this->path !== null) {
68 return $this->path;
69 }
70 if (isset($this->pathString[1]) && $this->pathString[0] === '/') {
71 return $this->path = explode('/', trim($this->pathString, '/'));
72 }
73
74 return $this->path = [];
75 }
76
77 return parent::__get($property);
78 }
79
87 public function __isset($property)
88 {
89 if ($property === 'contentId' || $property === 'path') {
90 return true;
91 }
92
93 return parent::__isset($property);
94 }
95 }
eZ\Publish\API\Repository\Values\Content\Location
Definition: API/Repository/Values/Content/Location.php:32
eZ\Publish\Core\Repository\Values\Content\Location
This class represents a location in the repository.
Definition: Core/Repository/Values/Content/Location.php:17
eZ\Publish\Core\Repository\Values\Content\Location\getContentInfo
getContentInfo()
Returns the content info of the content object of this location.
Definition: Core/Repository/Values/Content/Location.php:33
eZ\Publish\Core\Repository\Values\Content\Location\getProperties
getProperties($dynamicProperties=['contentId'])
Function where list of properties are returned.
Definition: Core/Repository/Values/Content/Location.php:49
eZ\Publish\Core\Repository\Values\Content\Location\$contentInfo
$contentInfo
Definition: Core/Repository/Values/Content/Location.php:23
eZ\Publish\Core\Repository\Values\Content\Location\$path
$path
Definition: Core/Repository/Values/Content/Location.php:26
eZ\Publish\Core\Repository\Values\Content\Location\__get
__get($property)
Magic getter for retrieving convenience properties.
Definition: Core/Repository/Values/Content/Location.php:61
eZ\Publish\Core\Repository\Values\Content\Location\__isset
__isset($property)
Magic isset for signaling existence of convenience properties.
Definition: Core/Repository/Values/Content/Location.php:87
eZ\Publish\Core\Repository\Values\Content
Definition: Publish/Core/Repository/Values/Content/Content.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.