Methods summary
public
|
#
__construct( array $messages = array() )
Create a new message bag instance.
Create a new message bag instance.
Parameters
|
public
Illuminate\Support\MessageBag
|
#
add( string $key, string $message )
Add a message to the bag.
Add a message to the bag.
Parameters
- $key
string $key
- $message
string $message
Returns
|
public
Illuminate\Support\MessageBag
|
#
merge( array $messages )
Merge a new array of messages into the bag.
Merge a new array of messages into the bag.
Parameters
Returns
|
protected
boolean
|
#
isUnique( string $key, string $message )
Determine if a key and message combination already exists.
Determine if a key and message combination already exists.
Parameters
- $key
string $key
- $message
string $message
Returns
boolean
|
public
boolean
|
#
has( string $key = null )
Determine if messages exist for a given key.
Determine if messages exist for a given key.
Parameters
Returns
boolean
|
public
string
|
#
first( string $key = null, string $format = null )
Get the first message from the bag for a given key.
Get the first message from the bag for a given key.
Parameters
- $key
string $key
- $format
string $format
Returns
string
|
public
array
|
#
get( string $key, string $format = null )
Get all of the messages from the bag for a given key.
Get all of the messages from the bag for a given key.
Parameters
- $key
string $key
- $format
string $format
Returns
array
|
public
array
|
#
all( string $format = null )
Get all of the messages for every key in the bag.
Get all of the messages for every key in the bag.
Parameters
Returns
array
|
protected
array
|
#
transform( array $messages, string $format, string $messageKey )
Format an array of messages.
Format an array of messages.
Parameters
- $messages
array $messages
- $format
string $format
- $messageKey
string $messageKey
Returns
array
|
protected
string
|
#
checkFormat( string $format )
Get the appropriate format based on the given format.
Get the appropriate format based on the given format.
Parameters
Returns
string
|
public
array
|
#
getMessages( )
Get the raw messages in the container.
Get the raw messages in the container.
Returns
array
|
public
Illuminate\Support\MessageBag
|
#
getMessageBag( )
Get the messages for the instance.
Get the messages for the instance.
Returns
Implementation of
|
public
string
|
#
getFormat( )
Get the default message format.
Get the default message format.
Returns
string
|
public
Illuminate\Support\MessageBag
|
#
setFormat( string $format = ':message' )
Set the default message format.
Set the default message format.
Parameters
Returns
|
public
boolean
|
#
isEmpty( )
Determine if the message bag has any messages.
Determine if the message bag has any messages.
Returns
boolean
|
public
boolean
|
#
any( )
Determine if the message bag has any messages.
Determine if the message bag has any messages.
Returns
boolean
|
public
integer
|
#
count( )
Get the number of messages in the container.
Get the number of messages in the container.
Returns
integer
Implementation of
|
public
array
|
#
toArray( )
Get the instance as an array.
Get the instance as an array.
Returns
array
Implementation of
|
public
string
|
#
toJson( integer $options = 0 )
Convert the object to its JSON representation.
Convert the object to its JSON representation.
Parameters
Returns
string
Implementation of
|
public
string
|
#
__toString( )
Convert the message bag to its string representation.
Convert the message bag to its string representation.
Returns
string
|