# Global

##

### Members

#### init :function

The constructor of Component, This function will be called when Component mapping be started.

##### Type:

- function

Source:
  - method.js, line 28

#### method :Object.<function()>

An object wrapped functions, This object is declared Component methods.

##### Type:

- Object.<function()>

Source:
  - method.js, line 34

#### options :Object.<Any>

Options decleared by caller, You can default option in ComponentMethod.

##### Type:

- Object.<Any>

Source:
  - method.js, line 49

#### store

ComponentData's store variable, This is the heart of ComponentData.

##### Properties:

Name | Type | Description
--- | --- | ---
`$self` | ComponentData | Reference of ComponentData (self).
`$super` | ComponentMethod | Reference of ComponentMethod.
`$helper` | ComponentHelper | Reference of ComponentHelper.
`_init` | Boolean | If component already done initialize process, It will be true (This is prevent a duplication of initializing).
`_anim` | Boolean | The logical variable of Component animating.
`_bind` | Boolean | The logical variable of Component binding.
`anim` | Object | Animation configuration object.
`framework` | String | Framework full name.
`prefix` | String | Framework short name for using set class name prefix of Component.
`id` | String | An unique id of Component, It will be automatically setted in the process of ComponentMethod.
`element` | Array.<jQuery> | Quick reference of jQuery objects that refered frequently.
`global` | Object | Global properties each of Components.

Source:
  - data.js, line 36

#### template :Object.<String>

An object wrapped templates, This object is declared templates which use in Component.

##### Type:

- Object.<String>

Source:
  - method.js, line 42

### Methods

#### bind(element, type, callback, initialize) → {undefined}

It will attach an event to your element, Use this function instead jQuery.bind.

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | jQuery | jQuery object for attach event.
`type` | String | Event type name.
`callback` | function | The callback function which fired when event triggered.
`initialize` | Boolean | If this parameter is true, The event is triggered once automatically.

Source:
  - helper.js, line 154

##### Returns:

Type
  undefined

#### getIdentifier() → {String}

You can get unique id for set each of component by using this function.

Source:
  - helper.js, line 138

##### Returns:

Type
  String

#### invoke(name, callback, time, invoke) → {Boolean}

This function will invoke promiss request that you created before.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | Promiss name for invoke a request.
`callback` | function | The callback when promiss is done.
`time` | Number | A millisecond time for promiss.
`invoke` | function | The callback when invoke request be received.

Source:
  - helper.js, line 78

##### Returns:

Type
  Boolean

#### log(message, code) → {undefined}

The logger of HOMEWORKS Frameworks, Use this instead console.log.

##### Parameters:

Name | Type | Description
--- | --- | ---
`message` | String | String error message or Exception object.
`code` | String | Error code or number.

Source:
  - helper.js, line 101

##### Returns:

Type
  undefined

#### parseTemplate(key, map) → {String}

This function find template that you declared on ComponentMethod's templates array, and than replace it using a key what you gave.

##### Parameters:

Name | Type | Description
--- | --- | ---
`key` | String | The template key.
`map` | Object | The template object.

Source:
  - helper.js, line 124

##### Returns:

Type
  String

#### promise(name, callback, time, invoke) → {Number}

Promiss is helping to make a schedule, It is similar like setTimeout.

##### Parameters:

Name | Type | Description
--- | --- | ---
`name` | String | Promiss name for control.
`callback` | function | The callback when promiss is done.
`time` | Number | A millisecond time for promiss.
`invoke` | function | The callback when invoke request be received.

Source:
  - helper.js, line 42

##### Returns:

setTimeout number.

Type
  Number

#### randomString(length) → {String}

Get random string that made 0-9 numbers, lower/upper case alphabets.

##### Parameters:

Name | Type | Description
--- | --- | ---
`length` | Number | Random string length.

Source:
  - helper.js, line 23

##### Returns:

Random string.

Type
  String

#### route(id) → {jQuery}

This function is core of ComponentMethod, This is provider to collecting Component by call patterns.

##### Parameters:

Name | Type | Description
--- | --- | ---
`id` | string | Component unique id for give to internel of Component.

Source:
  - method.js, line 67

##### Returns:

Type
  jQuery

#### trigger(element, type, value) → {undefined}

This function will trigger an event, Use this function instead jQuery.trigger.

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | jQuery | jQuery object for trigger event.
`type` | String | Event type name.
`value` | Any | Extra values for sending the binder function.

Source:
  - helper.js, line 202

##### Returns:

Type
  undefined

#### triggerHandler(element, type, value) → {undefined}

This function will trigger an event "only logically", Use this function instead jQuery.triggerHandler.

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | jQuery | jQuery object for trigger event logically.
`type` | String | Event type name.
`value` | Any | Extra values for sending the binder function.

Source:
  - helper.js, line 215

##### Returns:

Type
  undefined

#### unbind(element, type) → {undefined}

Deattach event from the jQuery object, Use this function instead jQuery.unbind.

##### Parameters:

Name | Type | Description
--- | --- | ---
`element` | jQuery | jQuery object for deattach event.
`type` | String | Event type name.

Source:
  - helper.js, line 190

##### Returns:

Type
  undefined