Packagecom.cyntaxic.cynmvc.model
Classpublic dynamic class CynModel
InheritanceCynModel Inheritance 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.



Public Properties
 PropertyDefined By
  version : VersionVO
[read-only] Returns the version number and description in a value object.
CynModel
Public Methods
 MethodDefined 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
Property Detail
versionproperty
version:VersionVO  [read-only]

Returns the version number and description in a value object.


Implementation
    public function get version():VersionVO
Constructor Detail
CynModel()Constructor
public function CynModel(self:CynModel)

Creates a new instance of CynModel.

Parameters
self:CynModel — Reference to itself to enforce it as an abstract class.

Throws
CynError — If attempted to be extended without super(this).
Method Detail
describe()method
public function describe(compact:Boolean = true):String

Returns 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.

Returns
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.