platform/api/laravel/Translation/CreatesPotentiallyTranslatedStrings.yaml

50 lines
1.8 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: CreatesPotentiallyTranslatedStrings
class_comment: null
dependencies: []
properties:
- name: destructor
visibility: protected
comment: "# * Create a pending potentially translated string.\n# *\n# * @param \
\ string $attribute\n# * @param string|null $message\n# * @return \\Illuminate\\\
Translation\\PotentiallyTranslatedString\n# */\n# protected function pendingPotentiallyTranslatedString($attribute,\
\ $message)\n# {\n# $destructor = $message === null\n# ? fn ($message) => $this->messages[]\
\ = $message\n# : fn ($message) => $this->messages[$attribute] = $message;\n#\
\ \n# return new class($message ?? $attribute, $this->validator->getTranslator(),\
\ $destructor) extends PotentiallyTranslatedString\n# {\n# /**\n# * The callback\
\ to call when the object destructs.\n# *\n# * @var \\Closure"
methods:
- name: pendingPotentiallyTranslatedString
visibility: protected
parameters:
- name: attribute
- name: message
comment: '# * Create a pending potentially translated string.
# *
# * @param string $attribute
# * @param string|null $message
# * @return \Illuminate\Translation\PotentiallyTranslatedString'
- name: __construct
visibility: public
parameters:
- name: message
- name: translator
- name: destructor
comment: "# * The callback to call when the object destructs.\n# *\n# * @var \\\
Closure\n# */\n# protected $destructor;\n# \n# /**\n# * Create a new pending potentially\
\ translated string.\n# *\n# * @param string $message\n# * @param \\Illuminate\\\
Contracts\\Translation\\Translator $translator\n# * @param \\Closure $destructor"
- name: __destruct
visibility: public
parameters: []
comment: '# * Handle the object''s destruction.
# *
# * @return void'
traits: []
interfaces: []