function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_i005_recipiente");
     $this->addAttribute("material", Datatypes::TEXT);
     $this->addAttribute("capacidad", Datatypes::FLOAT_NUMBER);
     $this->addAttribute("tieneTapa", Datatypes::BOOLEAN);
     $this->addConstraints("material", array(Constraint::maxLength(30), Constraint::blank(false)));
     $this->addConstraints("capacidad", array(Constraint::between(0.0, 10.0)));
     $this->addConstraints("tieneTapa", array(Constraint::nullable(true)));
     /*
     $this->constraints = array (
        "material" => array (
           Constraint :: maxLength(30),
           Constraint :: blank(false)
        ),
        "capacidad" => array (
           Constraint :: between(0.0, 10.0)
        ),
        "tieneTapa" => array (
           Constraint :: nullable(true)
        )
     );
     */
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_003_entidad");
     // BUG #19
     $this->addAttribute("tipo", Datatypes::TEXT);
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable('test_issue37_bbb');
     $this->belongsTo = array('AAA');
     $this->addAttribute('attrBBB', Datatypes::TEXT);
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable('test_hmb_aclass');
     $this->addAttribute('attrAClass', Datatypes::TEXT);
     $this->addHasMany('rolb1', 'BClass', self::HASMANY_COLLECTION, 'rel1');
     $this->addHasMany('rolb2', 'BClass', self::HASMANY_COLLECTION, 'rel2');
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable('test_002_cara');
     $this->addAttribute('color', Datatypes::TEXT);
     $this->addHasOne('nariz', 'Nariz');
     $this->addConstraints('color', array(Constraint::inList(array('blanco', 'negro', 'pardo')), Constraint::nullable(true)));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_m003_dedo");
     $this->belongsTo = array('Mano');
     $this->addHasOne('mano', 'Mano');
     $this->addAttribute("uniaLarga", Datatypes::BOOLEAN);
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_002_nariz");
     $this->belongsTo = array('Cara');
     $this->addAttribute("tamanio", Datatypes::TEXT);
     $this->addConstraints("tamanio", array(Constraint::inList(array("chica", "mediana", "grande"))));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable('test_dirty_bit_class1');
     $this->addAttribute('attr11', Datatypes::TEXT);
     $this->addAttribute('attr12', Datatypes::DATE);
     $this->addAttribute('attr13', Datatypes::INT_NUMBER);
     $this->addHasOne('class2', 'Class2');
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_m010_persona");
     $this->addAttribute("nombre", Datatypes::TEXT);
     // Los hijos de la persona
     $this->addHasMany("hijos", "M010_Persona");
     $this->belongsTo = array('M010_Persona');
     parent::__construct($args, $isSimpleInstance);
 }
 /**
  * Instancia Model e opcionalmente inicializa atributos com $data.
  * @param mixed $data
  */
 public function __construct($data = NULL)
 {
     parent::__construct();
     $this->_className = get_class($this);
     $p = strrpos($this->_className, '\\');
     $this->_namespace = substr($this->_className, 0, $p);
     $this->_map = $this->ORMMap();
     $this->onCreate($data);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("hello_world_persona");
     $this->addAttribute("nombre", Datatypes::TEXT);
     $this->addAttribute("edad", Datatypes::INT_NUMBER);
     $this->addConstraints("nombre", array(Constraint::maxLength(30), Constraint::blank(false)));
     $this->addConstraints("edad", array(Constraint::between(10, 100)));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable('test_dirty_bit_class3');
     $this->belongsTo = array('Class2');
     $this->addAttribute('attr31', Datatypes::TEXT);
     $this->addAttribute('attr32', Datatypes::DATE);
     $this->addAttribute('attr33', Datatypes::INT_NUMBER);
     parent::__construct($args, $isSimpleInstance);
 }
Exemple #13
0
 public function __construct($id)
 {
     parent::__construct($id);
     $ip = new stdClass();
     $ip->attributes = array("SystemSetting1", "SystemSetting3", "SystemSetting4");
     $ip->labels = array("SystemSetting1" => "IP-Adresse", "SystemSetting3" => "Gateway", "SystemSetting4" => "DNS-Server");
     $ip->name = "IP-Adresse";
     $this->types["ip"] = $ip;
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_m003_mano");
     $this->addHasMany('dedos', 'Dedo');
     // La unica diferencia con respecto al test i005
     $this->addAttribute("tamanio", Datatypes::TEXT);
     $this->addConstraints("tamanio", array(Constraint::inList(array("grande", "mediana", "chica"))));
     parent::__construct($args, $isSimpleInstance);
 }
Exemple #15
0
 public function __construct($id)
 {
     $this->myAdapterClass = "AdresseAdapter";
     #if($_SESSION["S"]->checkForPlugin("mLDAP"))
     #	$this->myAdapterClass = "AdresseLDAPAdapter";
     parent::__construct($id);
     if (!isset($_SESSION["viaInterface"])) {
         $this->customize();
     }
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_001_botella");
     $this->addAttribute("material", Datatypes::TEXT);
     $this->addAttribute("capacidad", Datatypes::FLOAT_NUMBER);
     $this->addAttribute("tapaRosca", Datatypes::BOOLEAN);
     $this->addConstraints("material", array(Constraint::maxLength(30), Constraint::blank(false)));
     $this->addConstraints("capacidad", array(Constraint::between(0.0, 10.0)));
     $this->addConstraints("tapaRosca", array(Constraint::nullable(true)));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_a004_pagina");
     $this->addAttribute("titulo", Datatypes::TEXT);
     $this->addAttribute("contenido", Datatypes::TEXT);
     // Pagina padre
     $this->addHasOne('owner', 'Pagina');
     // Paginas hijas
     $this->addHasMany('subpages', 'Pagina');
     $this->addConstraints("titulo", array(Constraint::maxLength(255)));
     $this->addConstraints("contenido", array(Constraint::maxLength(100000)));
     $this->addConstraints("owner", array(Constraint::nullable(true)));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable(self::TABLE);
     // message data
     $this->addAttribute('text', Datatypes::TEXT);
     $this->addAttribute('createdOn', Datatypes::DATETIME);
     // associations
     $this->addHasOne('createdBy', 'TUser');
     // the user that creates this twitter message
     // default values
     $this->setCreatedOn(date("Y-m-d H:i:s"));
     // Ya con formato de MySQL!
     // constraints
     $this->addConstraints('text', array(Constraint::maxLength(160), Constraint::nullable(false), Constraint::blank(false)));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable(self::TABLE);
     // user data
     $this->addAttribute('name', Datatypes::TEXT);
     $this->addAttribute('email', Datatypes::TEXT);
     // auth
     $this->addAttribute('username', Datatypes::TEXT);
     $this->addAttribute('password', Datatypes::TEXT);
     // associations
     $this->addHasMany('following', 'TUser', PersistentObject::HASMANY_SET);
     // users I follow, is a set
     // constraints
     $this->addConstraints('name', array(Constraint::minLength(1), Constraint::maxLength(255), Constraint::nullable(false), Constraint::blank(false)));
     $this->addConstraints('username', array(Constraint::blank(false)));
     $this->addConstraints('password', array(Constraint::minLength(4)));
     $this->addConstraints('email', array(Constraint::email()));
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_i005_contenido");
     $this->addAttribute("elemento", Datatypes::TEXT);
     $this->addAttribute("volumen", Datatypes::FLOAT_NUMBER);
     $this->addConstraints("elemento", array(Constraint::maxLength(30), Constraint::blank(false)));
     $this->addConstraints("volumen", array(Constraint::between(0.0, 10.0)));
     /*
     $this->constraints = array (
        "elemento" => array (
           Constraint :: maxLength(30),
           Constraint :: blank(false)
        ),
        "volumen" => array (
           Constraint :: between(0.0, 10.0)
        )
     );
     */
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable("test_i006_contenido1");
     $this->belongsTo = array('Vaso1');
     // La unica diferencia con respecto al test i005
     $this->addAttribute("elemento", Datatypes::TEXT);
     $this->addAttribute("volumen", Datatypes::FLOAT_NUMBER);
     $this->addConstraints("elemento", array(Constraint::maxLength(30), Constraint::blank(false)));
     $this->addConstraints("volumen", array(Constraint::between(0.0, 10.0)));
     /*
     $this->constraints = array (
        "elemento" => array (
           Constraint :: maxLength(30),
           Constraint :: blank(false)
        ),
        "volumen" => array (
           Constraint :: between(0.0, 10.0)
        )
     );
     */
     parent::__construct($args, $isSimpleInstance);
 }
 function __construct($id)
 {
     parent::__construct($id);
 }
 function __construct($ID)
 {
     parent::__construct($ID);
 }
Exemple #24
0
 function __construct($ID)
 {
     parent::__construct($ID);
     $this->storage = "phpFileDB";
 }
 public function __construct($args = array())
 {
     $this->attributeTypes = array("owner_id" => Datatypes::INT_NUMBER, "ref_id" => Datatypes::INT_NUMBER, "type" => Datatypes::INT_NUMBER, "ord" => Datatypes::INT_NUMBER);
     // Aca se pueden cargar valores por defecto!
     $this->attributeValues = array("owner_id" => NULL, "ref_id" => NULL, "type" => NULL, "ord" => NULL);
     $this->constraints = array("owner_id" => array(Constraint::nullable(false)), "ref_id" => array(Constraint::nullable(false)), "ord" => array(Constraint::nullable(true)));
     parent::__construct($args);
 }
 function __construct($ID)
 {
     parent::__construct($ID);
     $this->setParser("text", "Util::base64Parser");
     $this->customize();
 }
 function __construct($args = array(), $isSimpleInstance = false)
 {
     $this->setWithTable('test_issue37_aaa');
     $this->addHasMany('bs', 'BBB');
     parent::__construct($args, $isSimpleInstance);
 }
Exemple #28
0
 public function __construct($ID)
 {
     $this->storage = "File";
     parent::__construct($ID);
 }