Packagecom.lafabrick.reflex.ioc.object
Classpublic class IocObject
InheritanceIocObject Inheritance flash.events.EventDispatcher

Base for the creation of object which can be transformed into XML (class XMLObjectConverter)


Example

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

com.lafabrick.reflex.ioc.XMLObjectConverter


Public Methods
 MethodDefined by
  
IocObject
  
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
Constructor detail
IocObject()constructor
public function IocObject()
Method detail
getPropertyDescriptor()method
public function getPropertyDescriptor():Array

Return the table of description of the property of the object

Returns
Array
pushProperty()method 
public function pushProperty(property:Property):void

Add the property of the object defines in the table of the properties

Parameters
property:Property — The object Property defining a property of the object

See also