platform/api/laravel/Contracts/Support/MessageBag.yaml

154 lines
2.6 KiB
YAML
Raw Normal View History

2024-09-02 17:44:11 +00:00
name: MessageBag
class_comment: null
dependencies:
- name: Countable
type: class
source: Countable
properties: []
methods:
- name: keys
visibility: public
parameters: []
comment: '# * Get the keys present in the message bag.
# *
# * @return array'
- name: add
visibility: public
parameters:
- name: key
- name: message
comment: '# * Add a message to the bag.
# *
# * @param string $key
# * @param string $message
# * @return $this'
- name: merge
visibility: public
parameters:
- name: messages
comment: '# * Merge a new array of messages into the bag.
# *
# * @param \Illuminate\Contracts\Support\MessageProvider|array $messages
# * @return $this'
- name: has
visibility: public
parameters:
- name: key
comment: '# * Determine if messages exist for a given key.
# *
# * @param string|array $key
# * @return bool'
- name: first
visibility: public
parameters:
- name: key
default: 'null'
- name: format
default: 'null'
comment: '# * Get the first message from the bag for a given key.
# *
# * @param string|null $key
# * @param string|null $format
# * @return string'
- name: get
visibility: public
parameters:
- name: key
- name: format
default: 'null'
comment: '# * Get all of the messages from the bag for a given key.
# *
# * @param string $key
# * @param string|null $format
# * @return array'
- name: all
visibility: public
parameters:
- name: format
default: 'null'
comment: '# * Get all of the messages for every key in the bag.
# *
# * @param string|null $format
# * @return array'
- name: forget
visibility: public
parameters:
- name: key
comment: '# * Remove a message from the bag.
# *
# * @param string $key
# * @return $this'
- name: getMessages
visibility: public
parameters: []
comment: '# * Get the raw messages in the container.
# *
# * @return array'
- name: getFormat
visibility: public
parameters: []
comment: '# * Get the default message format.
# *
# * @return string'
- name: setFormat
visibility: public
parameters:
- name: format
default: ''':message'''
comment: '# * Set the default message format.
# *
# * @param string $format
# * @return $this'
- name: isEmpty
visibility: public
parameters: []
comment: '# * Determine if the message bag has any messages.
# *
# * @return bool'
- name: isNotEmpty
visibility: public
parameters: []
comment: '# * Determine if the message bag has any messages.
# *
# * @return bool'
traits:
- Countable
interfaces: []