[ Index ]
 

Code source de Symfony 1.0.0

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/lib/vendor/propel-generator/templates/sql/base/mysql/ -> columns.tpl (source)

   1  <?php
   2          $firstIteration = true;
   3      foreach ($table->getColumns() as $col) {
   4          if(!$firstIteration): ?>, 
   5  <?php endif; $firstIteration = false;
   6          //$entry = $col->getSqlString();
   7          //using the following code instead of the above line
   8          //for escaping column names:
   9  
  10          $entry = "";
  11          $entry .= "`" . $col->getName() . "` ";
  12          $entry .= $col->getDomain()->getSqlType();
  13          if ($col->getPlatform()->hasSize($col->getDomain()->getSqlType())) {
  14              $entry .= $col->getDomain()->printSize();
  15          }
  16          $entry .= " ";
  17          $entry .= $col->getDefaultSetting() . " ";
  18          $entry .= $col->getNotNullString() . " ";
  19          $entry .= $col->getAutoIncrementString();
  20  
  21          // collapse spaces
  22          $entry = preg_replace('/[\s]+/', ' ', $entry);
  23  
  24          // ' ,' -> ','
  25          $entry = preg_replace('/[\s]*,[\s]*/', ',', $entry);
  26  ?>
  27      <?php echo $entry ?><?php if ($col->getDescription()) { ?> COMMENT '<?php echo $platform->escapeText($col->getDescription()) ?>'<?php } ?>
  28  <?php } 


Généré le : Fri Mar 16 22:42:14 2007 par Balluche grâce à PHPXref 0.7