@@ -157,9 +157,12 @@ discard block |
||
| 157 | 157 | * Stored in ISO 8601 format. |
| 158 | 158 | * |
| 159 | 159 | * @param string|Zend_Date $<?= $column->getName () . "\n" ?> |
| 160 | - <?php else: ?> |
|
| 160 | + <?php else { |
|
| 161 | + : ?> |
|
| 161 | 162 | * @param <?= $column->getType () ?> $<?= $column->getName () . "\n" ?> |
| 162 | - <?php endif; ?> |
|
| 163 | + <?php endif; |
|
| 164 | +} |
|
| 165 | +?> |
|
| 163 | 166 | * @return <?= $className . "\n" ?> |
| 164 | 167 | */ |
| 165 | 168 | public function set<?= \Classes\Maker\AbstractMaker::getClassName ( $column->getName () ) ?>($<?= $column->getName ( |
@@ -208,9 +211,12 @@ discard block |
||
| 208 | 211 | <?php if ( $column->equalType ( 'date' ) ): ?> |
| 209 | 212 | * @param boolean $returnZendDate |
| 210 | 213 | * @return Zend_Date|null|string Zend_Date representation of this datetime if enabled, or ISO 8601 string if not |
| 211 | - <?php else: ?> |
|
| 214 | + <?php else { |
|
| 215 | + : ?> |
|
| 212 | 216 | * @return <?= $column->getType () . "\n" ?> |
| 213 | - <?php endif; ?> |
|
| 217 | + <?php endif; |
|
| 218 | +} |
|
| 219 | +?> |
|
| 214 | 220 | */ |
| 215 | 221 | public function get<?= \Classes\Maker\AbstractMaker::getClassName ( |
| 216 | 222 | $column->getName () |
@@ -35,26 +35,19 @@ |
||
| 35 | 35 | $res = ''; |
| 36 | 36 | if ( preg_match ( '/(tinyint\(1\)|bit)/', $str ) ) { |
| 37 | 37 | $res = 'boolean'; |
| 38 | - } |
|
| 39 | - elseif ( preg_match ( '/(timestamp|blob|char|enum)/', $str ) ) { |
|
| 38 | + } elseif ( preg_match ( '/(timestamp|blob|char|enum)/', $str ) ) { |
|
| 40 | 39 | $res = 'string'; |
| 41 | - } |
|
| 42 | - elseif ( preg_match ( '/(text)/', $str ) ) { |
|
| 40 | + } elseif ( preg_match ( '/(text)/', $str ) ) { |
|
| 43 | 41 | $res = 'text'; |
| 44 | - } |
|
| 45 | - elseif ( preg_match ( '/(decimal|numeric|float|double)/', $str ) ) { |
|
| 42 | + } elseif ( preg_match ( '/(decimal|numeric|float|double)/', $str ) ) { |
|
| 46 | 43 | $res = 'float'; |
| 47 | - } |
|
| 48 | - elseif ( preg_match ( '#^(?:tiny|small|medium|long|big|var)?(\w+)(?:\(\d+\))?(?:\s\w+)*$#', $str, $matches ) ) { |
|
| 44 | + } elseif ( preg_match ( '#^(?:tiny|small|medium|long|big|var)?(\w+)(?:\(\d+\))?(?:\s\w+)*$#', $str, $matches ) ) { |
|
| 49 | 45 | $res = $matches[ 1 ]; |
| 50 | - } |
|
| 51 | - elseif ( preg_match ( '/(date)/', $str ) ) { |
|
| 46 | + } elseif ( preg_match ( '/(date)/', $str ) ) { |
|
| 52 | 47 | $res = 'date'; |
| 53 | - } |
|
| 54 | - elseif ( preg_match ( '/(datetime)/', $str ) ) { |
|
| 48 | + } elseif ( preg_match ( '/(datetime)/', $str ) ) { |
|
| 55 | 49 | $res = 'datetime'; |
| 56 | - } |
|
| 57 | - else { |
|
| 50 | + } else { |
|
| 58 | 51 | print "Can't convert column type to Simple - Unrecognized type: $str"; |
| 59 | 52 | } |
| 60 | 53 | |
@@ -359,8 +359,7 @@ |
||
| 359 | 359 | if ( is_null ( $this->_pdo ) ) { |
| 360 | 360 | if ( !empty( $this->socket ) ) { |
| 361 | 361 | $pdoString = $this->getPDOSocketString (); |
| 362 | - } |
|
| 363 | - else { |
|
| 362 | + } else { |
|
| 364 | 363 | $pdoString = $this->getPDOString (); |
| 365 | 364 | } |
| 366 | 365 | |