Methods
_createModel() → {Fuction}
Creates a function that takes configurable options and creates a document. Alias for CoreController.db.default.create or CoreController.meta.create
- Source:
Returns:
A function that creates a document
- Type
- Fuction
_deleteModel() → {Fuction}
Creates a function that takes configurable options and deletes a document. Alias for CoreController.db.default.delete or CoreController.meta.delete
- Source:
Returns:
A function that deletes a document
- Type
- Fuction
_getPluginViewDefaultTemplate() → {function}
Creates a function that will resolve a template file path from a set of directories. Alias for CoreController._utility_responder.render
Returns:
A function that will resolve a valid file path for a template
- Type
- function
_getViewModelProperties() → {function}
Creates a function that will get inflected values from a given string
Returns:
A function that will get inflected values from a given string
- Type
- function
_handleDocumentQueryErrorResponse() → {function}
Creates a function that will render an error view from a template. Alias for CoreController._utility_responder.error
Returns:
A function that will render an error view from a template and send response
- Type
- function
_handleDocumentQueryRender() → {function}
Creates a function that will render a template and send HTTP response to client. Alias for CoreController._utility_responder.render
Returns:
A function that will render a template and send data to client
- Type
- function
_INITIALIZE_ALIASED_UTILITIES()
Initializes aliased utility methods and set the on "this"
- Source:
_INITIALIZE_UTILITY_RESPONDER()
Initializes a utility HTML responder adapter that is used to render templates if protocol responder is not an HTML adapter and set it to the "_utility_responder" property. This property is not writable, configurable or enumerable
- Source:
_loadModel() → {Fuction}
Creates a function that takes configurable options and queries the database for a single document. Alias for CoreController.db.default.load or CoreController.meta.load
- Source:
Returns:
A function that queries the database for a single document
- Type
- Fuction
_logError() → {function}
Logs an error. Alias for CoreController.protocol.error or CoreController.meta.error
- Source:
Returns:
Returns a function which logs an error using the CoreController logger
- Type
- function
_logWarning() → {function}
Logs a warning. Alias for CoreController.protocol.warn or CoreController.meta.warn
- Source:
Returns:
Returns a function which logs warnings using CoreController logger
- Type
- function
_renderView() → {function}
Creates a function that will render data from a view put can accept additional data for the template and always send a response. Alias for CoreController.protocol.respond
Returns:
A function that will render a view from a template given template data
- Type
- function
_respondInKind() → {function}
Creates a function that will send a HTTP response or return a formatted response object. Alias for CoreController.protocol.respond
Returns:
A function that will format response data and send a response
- Type
- function
_searchModel() → {Fuction}
Creates a function that takes configurable options and queries the database for multiple documents. Alias for CoreController.db.default.search or CoreController.meta.search
- Source:
Returns:
A function that queries the database for multiple documents
- Type
- Fuction
_STARTUP(options) → {Object}
Called a initialization of a "new" CoreController. Implements the "meta" property which grants additional access to child adapter metods through a Proxy. Initialized adapters according to configurations and default adapters
Parameters:
| Name | Type | Description | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | Configuration options for adapters Properties
|
- Source:
Returns:
"this"
- Type
- Object
_updateModel() → {Fuction}
Creates a function that takes configurable options and updates a document. Alias for CoreController.db.default.update or CoreController.meta.update
- Source:
Returns:
A function that updates a document
- Type
- Fuction
save_revision(req, res, next)
Express middleware that appends a saverevision flag to the req object
Parameters:
| Name | Type | Description |
|---|---|---|
req |
Object | Express request object |
res |
Object | Express response object |
next |
function | Express next function |
- Source: