PHP Method Schema::typeAndSize, someline-starter Code Examples

This page contains top rated real world PHP examples of method Schema::typeAndSize from package someline-starter extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: mysqlschema.php Project: Edo78/fluidframe
0
 function typeAndSize($column)
 {
     if ($column['type'] == 'enum') {
         $vals = array_map(array($this, 'quote'), $column['enum']);
         return 'enum(' . implode(',', $vals) . ')';
     } else {
         if ($this->_isString($column)) {
             $col = parent::typeAndSize($column);
             if (!empty($column['charset'])) {
                 $col .= ' CHARSET ' . $column['charset'];
             }
             if (!empty($column['collate'])) {
                 $col .= ' COLLATE ' . $column['collate'];
             }
             return $col;
         } else {
             return parent::typeAndSize($column);
         }
     }
 }
Example #2
Show file File: pgsqlschema.php Project: bashrc/gnusocial-debian
0
 function typeAndSize($column)
 {
     if ($column['type'] == 'enum') {
         $vals = array_map(array($this, 'quote'), $column['enum']);
         return "text check ({$name} in " . implode(',', $vals) . ')';
     } else {
         return parent::typeAndSize($column);
     }
 }