PluginProbe ʕ •ᴥ•ʔ
Kubio AI Page Builder / 2.8.3
Kubio AI Page Builder v2.8.3
2.8.4 2.8.3 2.8.2 2.8.1 trunk 1.0.0 1.0.1 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1 1.3.2 1.4.0 1.4.1 1.4.2 1.4.3 1.5.0 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.7.0 1.7.1 1.7.2 1.7.3 1.8.0 1.8.1 1.8.2 1.9.0 2.0.0 2.1.1 2.1.2 2.1.3 2.2.0 2.2.3 2.2.4 2.2.5 2.3.0 2.3.1 2.3.3 2.3.4 2.4.0 2.4.1 2.4.2 2.4.3 2.4.5 2.5.0 2.5.1 2.5.2 2.5.3 2.6.0 2.6.1 2.6.2 2.6.3 2.6.5 2.6.6 2.6.7 2.7.0 2.7.1 2.7.2 2.7.3 2.8.0
kubio / vendor / symfony / property-access / PropertyAccessorInterface.php
kubio / vendor / symfony / property-access Last commit date
Exception 1 year ago CHANGELOG.md 1 year ago LICENSE 1 year ago PropertyAccess.php 4 years ago PropertyAccessor.php 1 year ago PropertyAccessorBuilder.php 1 year ago PropertyAccessorInterface.php 1 year ago PropertyPath.php 1 year ago PropertyPathBuilder.php 1 year ago PropertyPathInterface.php 1 year ago PropertyPathIterator.php 1 year ago PropertyPathIteratorInterface.php 1 year ago README.md 4 years ago composer.json 1 year ago
PropertyAccessorInterface.php
115 lines
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\PropertyAccess;
13
14 /**
15 * Writes and reads values to/from an object/array graph.
16 *
17 * @author Bernhard Schussek <bschussek@gmail.com>
18 */
19 interface PropertyAccessorInterface
20 {
21 /**
22 * Sets the value at the end of the property path of the object graph.
23 *
24 * Example:
25 *
26 * use Symfony\Component\PropertyAccess\PropertyAccess;
27 *
28 * $propertyAccessor = PropertyAccess::createPropertyAccessor();
29 *
30 * echo $propertyAccessor->setValue($object, 'child.name', 'Fabien');
31 * // equals echo $object->getChild()->setName('Fabien');
32 *
33 * This method first tries to find a public setter for each property in the
34 * path. The name of the setter must be the camel-cased property name
35 * prefixed with "set".
36 *
37 * If the setter does not exist, this method tries to find a public
38 * property. The value of the property is then changed.
39 *
40 * If neither is found, an exception is thrown.
41 *
42 * @param object|array $objectOrArray The object or array to modify
43 * @param string|PropertyPathInterface $propertyPath The property path to modify
44 * @param mixed $value The value to set at the end of the property path
45 *
46 * @throws Exception\InvalidArgumentException If the property path is invalid
47 * @throws Exception\AccessException If a property/index does not exist or is not public
48 * @throws Exception\UnexpectedTypeException If a value within the path is neither object nor array
49 */
50 public function setValue(&$objectOrArray, $propertyPath, $value);
51
52 /**
53 * Returns the value at the end of the property path of the object graph.
54 *
55 * Example:
56 *
57 * use Symfony\Component\PropertyAccess\PropertyAccess;
58 *
59 * $propertyAccessor = PropertyAccess::createPropertyAccessor();
60 *
61 * echo $propertyAccessor->getValue($object, 'child.name');
62 * // equals echo $object->getChild()->getName();
63 *
64 * This method first tries to find a public getter for each property in the
65 * path. The name of the getter must be the camel-cased property name
66 * prefixed with "get", "is", or "has".
67 *
68 * If the getter does not exist, this method tries to find a public
69 * property. The value of the property is then returned.
70 *
71 * If none of them are found, an exception is thrown.
72 *
73 * @param object|array $objectOrArray The object or array to traverse
74 * @param string|PropertyPathInterface $propertyPath The property path to read
75 *
76 * @return mixed
77 *
78 * @throws Exception\InvalidArgumentException If the property path is invalid
79 * @throws Exception\AccessException If a property/index does not exist or is not public
80 * @throws Exception\UnexpectedTypeException If a value within the path is neither object
81 * nor array
82 */
83 public function getValue($objectOrArray, $propertyPath);
84
85 /**
86 * Returns whether a value can be written at a given property path.
87 *
88 * Whenever this method returns true, {@link setValue()} is guaranteed not
89 * to throw an exception when called with the same arguments.
90 *
91 * @param object|array $objectOrArray The object or array to check
92 * @param string|PropertyPathInterface $propertyPath The property path to check
93 *
94 * @return bool
95 *
96 * @throws Exception\InvalidArgumentException If the property path is invalid
97 */
98 public function isWritable($objectOrArray, $propertyPath);
99
100 /**
101 * Returns whether a property path can be read from an object graph.
102 *
103 * Whenever this method returns true, {@link getValue()} is guaranteed not
104 * to throw an exception when called with the same arguments.
105 *
106 * @param object|array $objectOrArray The object or array to check
107 * @param string|PropertyPathInterface $propertyPath The property path to check
108 *
109 * @return bool
110 *
111 * @throws Exception\InvalidArgumentException If the property path is invalid
112 */
113 public function isReadable($objectOrArray, $propertyPath);
114 }
115