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("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_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_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); }