array("label"=>"Image"), // self::TYPE_HTML=>array("label"=>"Html") // ); const POSITION_HEAD = 1; const POSITION_BODY = 2; const GENERAL_CATEGORY = 0; public static $BANNER_POSITIONS = array( self::POSITION_HEAD=>array("label"=>"Testata"), self::POSITION_BODY=>array("label"=>"Corpo") ); public function __construct($saveableObject = null){ parent::__construct($saveableObject); if (!$this->hasProperty("categories")){ $this->categories = array(self::GENERAL_CATEGORY); } } public function __set($attr,$value){ if (strcmp("type", $attr)==0 || strcmp("position", $attr)==0){ $value = intval($value); } return parent::__set($attr, $value); } public static function getCollectionName(){ return "banner"; } } ?>