63 lines
2.3 KiB
YAML
63 lines
2.3 KiB
YAML
|
name: PhpSerializer
|
||
|
class_comment: '# * @author Ryan Weaver<ryan@symfonycasts.com>'
|
||
|
dependencies:
|
||
|
- name: Envelope
|
||
|
type: class
|
||
|
source: Symfony\Component\Messenger\Envelope
|
||
|
- name: MessageDecodingFailedException
|
||
|
type: class
|
||
|
source: Symfony\Component\Messenger\Exception\MessageDecodingFailedException
|
||
|
- name: MessageDecodingFailedStamp
|
||
|
type: class
|
||
|
source: Symfony\Component\Messenger\Stamp\MessageDecodingFailedStamp
|
||
|
- name: NonSendableStampInterface
|
||
|
type: class
|
||
|
source: Symfony\Component\Messenger\Stamp\NonSendableStampInterface
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: acceptPhpIncompleteClass
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: "# * @author Ryan Weaver<ryan@symfonycasts.com>\n# */\n# class PhpSerializer\
|
||
|
\ implements SerializerInterface\n# {\n# private bool $acceptPhpIncompleteClass\
|
||
|
\ = false;\n# \n# /**\n# * @internal"
|
||
|
- name: rejectPhpIncompleteClass
|
||
|
visibility: public
|
||
|
parameters: []
|
||
|
comment: '# * @internal'
|
||
|
- name: decode
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: encodedEnvelope
|
||
|
comment: null
|
||
|
- name: encode
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: envelope
|
||
|
comment: null
|
||
|
- name: safelyUnserialize
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: contents
|
||
|
comment: null
|
||
|
- name: handleUnserializeCallback
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: class
|
||
|
comment: "# @var Envelope */\n# $envelope = unserialize($contents);\n# } catch (\\\
|
||
|
Throwable $e) {\n# if ($e instanceof MessageDecodingFailedException) {\n# throw\
|
||
|
\ $e;\n# }\n# \n# throw new MessageDecodingFailedException('Could not decode Envelope:\
|
||
|
\ '.$e->getMessage(), 0, $e);\n# } finally {\n# restore_error_handler();\n# ini_set('unserialize_callback_func',\
|
||
|
\ $prevUnserializeHandler);\n# }\n# \n# if (!$envelope instanceof Envelope) {\n\
|
||
|
# throw new MessageDecodingFailedException('Could not decode message into an Envelope.');\n\
|
||
|
# }\n# \n# if ($envelope->getMessage() instanceof \\__PHP_Incomplete_Class) {\n\
|
||
|
# $envelope = $envelope->with(new MessageDecodingFailedStamp());\n# }\n# \n# return\
|
||
|
\ $envelope;\n# }\n# \n# /**\n# * @internal"
|
||
|
traits:
|
||
|
- Symfony\Component\Messenger\Envelope
|
||
|
- Symfony\Component\Messenger\Exception\MessageDecodingFailedException
|
||
|
- Symfony\Component\Messenger\Stamp\MessageDecodingFailedStamp
|
||
|
- Symfony\Component\Messenger\Stamp\NonSendableStampInterface
|
||
|
interfaces:
|
||
|
- SerializerInterface
|