\Orpheus\Publisher\ExceptionInvalidFieldException

The invalid field exception class

This exception is thrown when we try to validate a form field and it's invalid.

Summary

Methods
Properties
Constants
__construct()
getDomain()
setDomain()
getReport()
getText()
__toString()
getField()
getType()
getValue()
removeArgs()
getArgs()
getKey()
from()
No public properties found
No constants found
No protected methods found
$domain
$key
$type
$field
$value
$args
N/A
No private methods found
No private properties found
N/A

Properties

$domain

$domain : string

The translation domain

Type

string

$key

$key : string

The message key

Type

string

$type

$type : string

The type

Type

string

$field

$field : string

The input field name

Type

string

$value

$value : string

The value that is not valid

Type

string

$args

$args : array

The arguments of this check

Type

array

Methods

__construct()

__construct(string  $key, string  $field, string  $value, string  $type = null, string  $domain = null, array  $typeArgs = array()) 

Constructor

Parameters

string $key
string $field
string $value
string $type
string $domain

The domain for the message, optionnal, allow $code

array $typeArgs

getDomain()

getDomain() : string

Get the domain

Returns

string

setDomain()

setDomain(string  $domain) 

Set the domain

Parameters

string $domain

The new domain

getReport()

getReport() : string

Get the report from this exception

Returns

string

getText()

getText() : string

Get the user's message

Returns

string —

The translated message from this exception

__toString()

__toString() : string

Get the string representation of this exception

Returns

string

getField()

getField() : string

Get the field

Returns

string

getType()

getType() : string

Get the type of the field

Returns

string

getValue()

getValue() : string

Get the field's value that is not valid

Returns

string

removeArgs()

removeArgs() 

Remove args from this exception, this is required for some tests (generating possible errors)

getArgs()

getArgs() : array

Get the field's arguments

Returns

array

getKey()

getKey() : string

Get the key for this field and message

Returns

string

from()

from(\Orpheus\Exception\UserException  $e, string  $field, string  $value, string  $type = null, array  $args = array()) : \Orpheus\Publisher\Exception\InvalidFieldException

Convert an UserException into an InvalidFieldException using other parameters

Parameters

\Orpheus\Exception\UserException $e
string $field
string $value
string $type
array $args

Returns

\Orpheus\Publisher\Exception\InvalidFieldException