FactoryInterface Class
interface of factory
Item Index
Methods
- camelize static
- createDict
- createEmpty
- createFromObject
- createList
- getProto static
- hyphenize static
- isInstance static
- modifyDate static
- Util
Properties
- modelName static
Methods
camelize
(
String
static
-
hyphened
-
[lowerFirst=false]
converts hyphenation to camel case
'shinout-no-macbook-pro' => 'ShinoutNoMacbookPro'
'shinout-no-macbook-pro' => 'shinoutNoMacbookPro' # if lowerFirst = true
Parameters:
-
hyphened
String -
[lowerFirst=false]
Boolean optionalmake capital char lower
Returns:
String:
cameled
createDict
(
BaseDict
public
-
dictModelName
-
obj
-
[options={}]
create model dict
Parameters:
-
dictModelName
Stringmodel name of dict
-
obj
Any -
[options={}]
Object optional-
[include]
Object optionaloptions to pass to Includer
-
[async=false]
Object optionalinclude submodels asynchronously -
[props]
Array(String) optionalinclude submodels of given props
-
-
Returns:
BaseDict:
dict
createFromObject
(
BaseModel
public
-
obj
-
[options={}]
create instance of model class by plain object
for each prop, values are set by Model#set(prop, value)
Parameters:
-
obj
Object -
[options={}]
Object optional-
[include]
Object optionaloptions to pass to Includer
-
[async=false]
Object optionalinclude submodels asynchronously -
[props]
Array(String) optionalinclude submodels of given props
-
-
Returns:
BaseModel:
model
createList
(
BaseList
public
-
listModelName
-
obj
-
[options={}]
create model list
Parameters:
-
listModelName
Stringmodel name of list
-
obj
Any -
[options={}]
Object optional-
[include]
Object optionaloptions to pass to Includer
-
[async=false]
Object optionalinclude submodels asynchronously -
[props]
Array(String) optionalinclude submodels of given props
-
-
Returns:
BaseList:
list
getProto
(
Object
static
-
obj
get proto of the given object
Parameters:
-
obj
Object
Returns:
Object:
proto
hyphenize
(
String
static
-
hyphened
converts hyphenation to camel case
'ShinoutNoMacbookPro' => 'shinout-no-macbook-pro'
'ABC' => 'a-b-c' # current implementation... FIXME ?
Parameters:
-
hyphened
String
Returns:
String:
cameled
isInstance
(
Boolean
static
-
instance
-
class
in Titanium, "A instanceof B" sometimes fails. this is the alternative.
Parameters:
-
instance
Object -
class
Function
Returns:
Boolean:
A is instance of B
modifyDate
(
String
static
-
UNKNOWN
converts instans with toISOString method to ISOString
Parameters:
-
UNKNOWN
Entity | Object
Returns:
String:
ISOString
Util
()
Properties
modelName
String
protected
static
model name to handle