protected function validate($class)
 {
     $this->acceptsNoKeyedValues();
     $this->minimumParameterCount(1);
     $this->maximumParameterCount(3);
     $this->acceptedKeylessValues(array_merge(RecessType::all(), array('PrimaryKey', 'AutoIncrement')));
 }
Пример #2
0
 static function all()
 {
     if (!isset(self::$all)) {
         self::$all = array(self::STRING, self::TEXT, self::INTEGER, self::BOOLEAN, self::FLOAT, self::TIME, self::TIMESTAMP, self::DATETIME, self::DATE, self::BLOB);
     }
     return self::$all;
 }
 static function getRecessType($sqliteType)
 {
     $recessType = $sqliteType;
     if ($recessType == 'DATETIME') {
         $recessType = 'DateTime';
     } else {
         $recessType = ucfirst(strtolower($recessType));
     }
     if (!in_array($recessType, RecessType::all())) {
         $recessType = RecessType::TEXT;
     }
     return $recessType;
 }