\AdventureRes\Models\Input ServiceDisplayInputModel

Class ServiceDisplayInputModel

Summary

Methods
Properties
Constants
__construct()
__get()
__set()
__isset()
populateModel()
getAttributeNames()
getAttributes()
getAttribute()
setAttribute()
isValid()
clearErrors()
hasErrors()
getErrors()
getErrorsAsString()
__call()
$ServiceId
No constants found
defineAttributes()
No protected properties found
N/A
No private methods found
$attributes
$errors
N/A

Properties

$ServiceId

$ServiceId : integer

Type

integer

$attributes

$attributes : array

Type

array — An key/value array of attributes to assign to the model.

$errors

$errors : array

Type

array — The errors generated by the model's validation.

Methods

__construct()

__construct(array|null  $attributes = null) 

AbstractAdventureResModel constructor.

Parameters

array|null $attributes

__get()

__get(  $name) : mixed

PHP magic method to treat attributes from defineAttributes as properties.

Parameters

$name

Throws

\AdventureRes\Exceptions\AdventureResModelException

Returns

mixed

__set()

__set(  $name,   $value) 

PHP magic method to treat attributes from defineAttributes as properties.

Parameters

$name
$value

Throws

\AdventureRes\Exceptions\AdventureResModelException

__isset()

__isset(  $name) : boolean

PHP magic method to treat attributes from defineAttributes as properties.

Parameters

$name

Returns

boolean

populateModel()

populateModel(array  $attributes) : \AdventureRes\Models\AbstractAdventureResModel

Populates a new model instance with a given set of attributes.

Parameters

array $attributes

An array of attributes and values to populate into the model.

Returns

\AdventureRes\Models\AbstractAdventureResModel

getAttributeNames()

getAttributeNames() : array

Returns the list of the model's attribute names.

Returns

array

getAttributes()

getAttributes() : array

Returns an array of attributes and their assigned values of an instance of the model.

Returns

array

getAttribute()

getAttribute(string  $name) : mixed

Returns the value for a specified attribute of an instance of the model.

Parameters

string $name

Returns

mixed

setAttribute()

setAttribute(string  $name, mixed  $value) 

Sets a value for a specified attribute on the instance of the model.

Parameters

string $name
mixed $value

isValid()

isValid() : boolean

Runs a validation check to see if the model instance is valid.

Returns

boolean

clearErrors()

clearErrors(string|null  $attributeName = null) 

Removes errors for all attributes or a single attribute.

Parameters

string|null $attributeName

hasErrors()

hasErrors() : boolean

Determines if the model instance contains errors.

Returns

boolean

getErrors()

getErrors() : array|null

Returns an array of errors from the model instance.

Returns

array|null

getErrorsAsString()

getErrorsAsString() : array|null

Returns all errors as a string.

Returns

array|null

__call()

__call(  $command,   $arguments) 

Parameters

$command
$arguments

defineAttributes()

defineAttributes() : array

Defines this model's attributes.

Returns

array