Class: DTO

DTO

new DTO(nm, module)

A SnoozeJS DTO
Parameters:
Name Type Description
nm string The name of the DTO
module object The module the DTO will belong to
Source:

Methods

(inner) $get() → {object}

Inject function gets a DTO Instance
Source:
Returns:
A DTO Instance
Type
object

(inner) addProperty(name)

Adds a new property to the DTO
Parameters:
Name Type Description
name string The name (or key) of the property
Source:

(inner) getName() → {string}

Gets the name of the Controller
Source:
Returns:
The name of the Controller
Type
string

(inner) getProperties() → {array}

Gets the defined properties
Source:
Returns:
Properties
Type
array

(inner) isStrict(boolopt) → {boolean}

Sets or returns the strict mode of the DTO
Parameters:
Name Type Attributes Description
bool boolean <optional>
Optional boolean
Source:
Returns:
If no bool param is defined returns true if the DTO is in strict mode
Type
boolean

(inner) setMethods(methods)

Sets the custom methods for all DTO instances created from this DTO
Parameters:
Name Type Description
methods array An array of methods (post injection)
Source: