File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -321,6 +321,28 @@ The YAML specification defines some tags to set the type of any data explicitly:
321321 Pz7Y6OjuDg4J+fn5OTk6enp
322322 56enmleECcgggoBADs=
323323
324+ Symfony Specific Tags
325+ ~~~~~~~~~~~~~~~~~~~~~
326+
327+ The YAML component provides a few additional tags that brings a few
328+ features when parsed in your PHP code:
329+
330+ * ``!php/const `` allows to use a constant name defined in a PHP file. This
331+ tag takes a constant FQCN as its argument:
332+
333+ .. code-block :: yaml
334+
335+ data :
336+ page_limit : !php/const App\Pagination\Paginator::PAGE_LIMIT
337+
338+ * ``!php/object `` allows to pass the serialized representation of a PHP
339+ object, which will be deserialized when the parsing is done:
340+
341+ .. code-block :: yaml
342+
343+ data :
344+ my_object : !php/object 'O:8:"stdClass":1:{s:3:"bar";i:2;}'
345+
324346 Unsupported YAML Features
325347~~~~~~~~~~~~~~~~~~~~~~~~~
326348
You can’t perform that action at this time.
0 commit comments