Esempio n. 1
0
 /**
  * @param string $id one of DBType constants
  * @param boolean $nullable optional whether type is nullable; default is NOT NULL
  * @param int|null $size size of a type, if the type can have size; by default size is not set
  * @param int|null $precision precision of a type, if the type can have precision; by default precision is not set
  * @param int|null $scale scale of a type, if the type can have scale; by default scale is not set
  * @param boolean $generated whether type can be generated by the database; by default is not
  */
 function __construct($id, $nullable = false, $size = null, $precision = null, $scale = null, $generated = false)
 {
     parent::__construct($id);
     $this->setIsNullable($nullable);
     if ($this->canHaveSize()) {
         $this->setSize($size);
     } else {
         if ($this->canHavePrecision()) {
             $this->setPrecision($precision);
             if ($this->canHaveScale()) {
                 $this->setScale($scale);
             }
         }
     }
     if ($this->canBeGenerated()) {
         $this->setGenerated($generated);
     }
 }
Esempio n. 2
0
 function __construct($id)
 {
     parent::__construct($this->fixValue($id));
 }
 public function __construct($key_, $name_, $value_, array $options_ = [])
 {
     parent::__construct($key_, $name_);
     $this->m_value = $value_;
     $this->m_options = $options_;
 }
 public function __construct($key_, $name_, Io_Charset $charset_ = null)
 {
     parent::__construct($key_, $name_);
     if (null === $charset_) {
         $charset_ = Io_Charset::defaultCharset();
     }
     $this->m_charset = $charset_;
 }