Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d14273c

Browse filesBrowse files
committed
document property info exclude static properties
1 parent b43a26f commit d14273c
Copy full SHA for d14273c

File tree

1 file changed

+16
-0
lines changed
Filter options

1 file changed

+16
-0
lines changed

‎components/property_info.rst

Copy file name to clipboardExpand all lines: components/property_info.rst
+16Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,22 @@ constructor. It supports return and scalar types for PHP 7.
409409
// Initializable information
410410
$reflectionExtractor->isInitializable($class, $property);
411411
412+
Excluding static properties
413+
...........................
414+
By default, the static properties are extracted. To get them excluded,
415+
you can use the ``exclude_static_properties`` context option.
416+
417+
418+
.. code-block:: php
419+
420+
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor;
421+
422+
$reflectionExtractor = new ReflectionExtractor();
423+
424+
$reflectionExtractor->getProperties($class, [
425+
ReflectionExtractor::EXCLUDE_STATIC_PROPERTIES => true,
426+
]);
427+
412428
PhpDocExtractor
413429
~~~~~~~~~~~~~~~
414430

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.