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

API/Repository/Exceptions/PropertyReadOnlyException.php
Go to the documentation of this file.
1 <?php
2
7 namespace eZ\Publish\API\Repository\Exceptions;
8
9 use Exception;
10
14 class PropertyReadOnlyException extends Exception
15 {
23 public function __construct($propertyName, $className = null, Exception $previous = null)
24 {
25 if ($className === null) {
26 parent::__construct("Property '{$propertyName}' is readonly", 0, $previous);
27 } else {
28 parent::__construct("Property '{$propertyName}' is readonly on class '{$className}'", 0, $previous);
29 }
30 }
31 }
eZ\Publish\API\Repository\Exceptions\PropertyReadOnlyException
This Exception is thrown on a write attempt in a read only property in a value object.
Definition: API/Repository/Exceptions/PropertyReadOnlyException.php:15
eZ\Publish\API\Repository\Exceptions\PropertyReadOnlyException\__construct
__construct($propertyName, $className=null, Exception $previous=null)
Generates: Property '{$propertyName}' is readonly[ on class '{$className}'].
Definition: API/Repository/Exceptions/PropertyReadOnlyException.php:23
eZ\Publish\API\Repository\Exceptions
Definition: API/Repository/Exceptions/BadStateException.php:7
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.