| Package | com.cyntaxic.cynmvc.model |
| Class | public dynamic class CynModel |
| Inheritance | CynModel flash.events.EventDispatcher |
CynModel is an abstract class to be extended by the application being
created with the Cyntaxic framework. The model is where all data for the application
is stored.
| Property | Defined By | ||
|---|---|---|---|
| version : VersionVO [read-only]
Returns the version number and description in a value object. | CynModel | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new instance of CynModel. | CynModel | ||
describe(compact:Boolean = true):String
Returns a valid JSON string describing the object. | CynModel | ||
get(handle:Object, url:String, data:Object = null, contentType:String = null, headers:Array = null):void
Sends a HTTP GET call. | CynModel | ||
post(handle:Object, url:String, data:Object = null, contentType:String = null, headers:Array = null):void
Sends a HTTP POST call. | CynModel | ||
| version | property |
version:VersionVO [read-only] Returns the version number and description in a value object.
public function get version():VersionVO| CynModel | () | Constructor |
public function CynModel(self:CynModel)
Creates a new instance of CynModel.
self:CynModel — Reference to itself to enforce it as an abstract class.
|
CynError — If attempted to be extended without super(this).
|
| describe | () | method |
public function describe(compact:Boolean = true):StringReturns a valid JSON string describing the object. Objects that can't be used in JSON like the Function object are returned as a string literal.
Parameters
compact:Boolean (default = true) — If false the string is not compacted.
|
String — A valid JSON string.
|
| get | () | method |
public function get(handle:Object, url:String, data:Object = null, contentType:String = null, headers:Array = null):void
Sends a HTTP GET call. When the call is complete the controller
execute function is called to handle the returned data.
Parameters
handle:Object — The callback function handle.
| |
url:String — The URL to be called.
| |
data:Object (default = null) — The data to send to the server.
| |
contentType:String (default = null) — The content type of the data.
| |
headers:Array (default = null) — The headers to send to the server.
|
| post | () | method |
public function post(handle:Object, url:String, data:Object = null, contentType:String = null, headers:Array = null):void
Sends a HTTP POST call. When the call is complete the controller
execute function is called to handle the returned data.
Parameters
handle:Object — The callback function handle.
| |
url:String — The URL to be called.
| |
data:Object (default = null) — The data to send to the server.
| |
contentType:String (default = null) — The content type of the data.
| |
headers:Array (default = null) — The headers to send to the server.
|