You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #10319 [PropertyInfo] Add an extractor to guess if a property is initializable (dunglas, javiereguiluz)
This PR was merged into the master branch.
Discussion
----------
[PropertyInfo] Add an extractor to guess if a property is initializable
symfony/symfony#26997symfony/symfony#24571Closes#10272.
Commits
-------
8415f96 Minor tweaks
eebca4a RST
f7ed144 [PropertyInfo] Add an extractor to guess if a property is initializable
The :class:`Symfony\\Component\\PropertyInfo\\PropertyInfoExtractor`
123
-
class exposes public methods to extract four types of information:
130
+
class exposes public methods to extract several types of information:
124
131
125
-
* :ref:`List of properties <property-info-list>`: `getProperties()`
126
-
* :ref:`Property type <property-info-type>`: `getTypes()`
127
-
* :ref:`Property description <property-info-description>`: `getShortDescription()` and `getLongDescription()`
128
-
* :ref:`Property access details <property-info-access>`: `isReadable()` and `isWritable()`
132
+
* :ref:`List of properties <property-info-list>`: :method:`Symfony\\Component\\PropertyInfo\\PropertyListExtractorInterface::getProperties()`
133
+
* :ref:`Property type <property-info-type>`: :method:`Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface::getTypes()`
134
+
* :ref:`Property description <property-info-description>`: :method:`Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface::getShortDescription()` and :method:`Symfony\\Component\\PropertyInfo\\PropertyDescriptionExtractorInterface::getLongDescription()`
135
+
* :ref:`Property access details <property-info-access>`: :method:`Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface::isReadable()` and :method:`Symfony\\Component\\PropertyInfo\\PropertyAccessExtractorInterface::isWritable()`
136
+
* :ref:`Property initializable through the constructor <property-info-initializable>`: :method:`Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface::isInitializable()`
129
137
130
138
.. note::
131
139
@@ -244,10 +252,27 @@ works.
244
252
The support of hasser methods in the ``ReflectionExtractor`` class was
245
253
introduced in Symfony 4.1.
246
254
255
+
.. _property-info-initializable:
256
+
257
+
Property Initializable Information
258
+
----------------------------------
259
+
260
+
Extractors that implement :class:`Symfony\\Component\\PropertyInfo\\PropertyInitializableExtractorInterface`
261
+
provide whether properties are initializable through the class's constructor as booleans.
0 commit comments