API Docs for:
Show:

FactoryInterface Class

interface of factory

Item Index

Properties

Methods

camelize

(
  • hyphened
  • [lowerFirst=false]
)
String static

converts hyphenation to camel case

'shinout-no-macbook-pro' => 'ShinoutNoMacbookPro'
'shinout-no-macbook-pro' => 'shinoutNoMacbookPro' # if lowerFirst = true

Parameters:

  • hyphened String
  • [lowerFirst=false] Boolean optional

    make capital char lower

Returns:

String:

cameled

createDict

(
  • dictModelName
  • obj
  • [options={}]
)
BaseDict public

create model dict

Parameters:

  • dictModelName String

    model name of dict

  • obj Any
  • [options={}] Object optional
    • [include] Object optional

      options to pass to Includer

      • [async=false] Object optional
        include submodels asynchronously
      • [props] Array(String) optional
        include submodels of given props

Returns:

BaseDict:

dict

createEmpty

() BaseModel

create empty model instance

Returns:

createFromObject

(
  • obj
  • [options={}]
)
BaseModel public

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 optional

      options to pass to Includer

      • [async=false] Object optional
        include submodels asynchronously
      • [props] Array(String) optional
        include submodels of given props

Returns:

BaseModel:

model

createList

(
  • listModelName
  • obj
  • [options={}]
)
BaseList public

create model list

Parameters:

  • listModelName String

    model name of list

  • obj Any
  • [options={}] Object optional
    • [include] Object optional

      options to pass to Includer

      • [async=false] Object optional
        include submodels asynchronously
      • [props] Array(String) optional
        include submodels of given props

Returns:

BaseList:

list

getProto

(
  • obj
)
Object static

get proto of the given object

Parameters:

  • obj Object

Returns:

Object:

proto

hyphenize

(
  • hyphened
)
String static

converts hyphenation to camel case

'ShinoutNoMacbookPro' => 'shinout-no-macbook-pro'
'ABC' => 'a-b-c' # current implementation... FIXME ?

Parameters:

  • hyphened String

Returns:

String:

cameled

isInstance

(
  • instance
  • class
)
Boolean static

in Titanium, "A instanceof B" sometimes fails. this is the alternative.

Parameters:

  • instance Object
  • class Function

Returns:

Boolean:

A is instance of B

modifyDate

(
  • UNKNOWN
)
String static

converts instans with toISOString method to ISOString

Parameters:

Returns:

String:

ISOString

Properties

modelName

String protected static

model name to handle