| Package | com.lafabrick.reflex.ioc.object |
| Class | public class IocObject |
| Inheritance | IocObject flash.events.EventDispatcher |
Creation of a data transfert object IocObject.
package object
{
import com.lafabrick.reflex.ioc.object.IocObject;
import com.lafabrick.reflex.ioc.property.Property;
import com.lafabrick.reflex.ioc.property.PropertyType;
public class MyObject extends IocObject
{
public function MyObject()
{
pushProperty( new Property("title" , PropertyType.STRING ) );
pushProperty( new Property("description" , PropertyType.STRING ) );
pushProperty( new Property("date" , PropertyType.DATE ) );
}
public var title : String;
public var description : String;
public var date : Date;
}
}
Conversion of the object MyObject in XML String.
var myObject:MyObject = new MyObject(); myObject.title = "my title"; myObject.description = "my description"; myObject.date = new Date(); var xmlObject:String = XMLObjectConverter.objectToXml( myObject ); trace( "myObject to xmlString : \n" + xmlObject );
See also
| Method | Defined by | ||
|---|---|---|---|
| IocObject | |||
|
getPropertyDescriptor():Array
Return the table of description of the property of the object
| IocObject | ||
|
pushProperty(property:Property):void
Add the property of the object defines in the table of the properties
| IocObject | ||
| IocObject | () | constructor |
public function IocObject()
| getPropertyDescriptor | () | method |
public function getPropertyDescriptor():ArrayReturn the table of description of the property of the object
ReturnsArray |
| pushProperty | () | method |
public function pushProperty(property:Property):voidAdd the property of the object defines in the table of the properties
Parametersproperty:Property — The object Property defining a property of the object
|
See also