@@ -1,20 +1,20 @@ |
||
| 1 | 1 | <?="<?php\n"?> |
| 2 | 2 | |
| 3 | 3 | /** |
| 4 | - * <?=$this->config->last_modify."\n"?> |
|
| 4 | + * <?=$this->config->last_modify . "\n"?> |
|
| 5 | 5 | * |
| 6 | 6 | * @package <?=$this->config->namespace?>Model |
| 7 | 7 | * @subpackage Model |
| 8 | 8 | * @see Zend_Exception. <?="\n"?> |
| 9 | 9 | * |
| 10 | - * @author <?=$this->config->author."\n"?> |
|
| 10 | + * @author <?=$this->config->author . "\n"?> |
|
| 11 | 11 | * |
| 12 | - * @copyright <?=$this->config->copyright."\n"?> |
|
| 13 | - * @license <?=$this->config->license."\n"?> |
|
| 14 | - * @link <?=$this->config->link."\n"?> |
|
| 15 | - * @version <?=$this->config->version."\n"?> |
|
| 12 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
| 13 | + * @license <?=$this->config->license . "\n"?> |
|
| 14 | + * @link <?=$this->config->link . "\n"?> |
|
| 15 | + * @version <?=$this->config->version . "\n"?> |
|
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | -class <?=$this->config->namespace?$this->config->namespace."_":""?>Model_EntityException extends Exception |
|
| 18 | +class <?=$this->config->namespace ? $this->config->namespace . "_" : ""?>Model_EntityException extends Exception |
|
| 19 | 19 | { |
| 20 | 20 | } |
@@ -3,21 +3,21 @@ discard block |
||
| 3 | 3 | /** |
| 4 | 4 | * Application Model DbTables |
| 5 | 5 | * |
| 6 | - * <?=$this->config->last_modify."\n"?> |
|
| 6 | + * <?=$this->config->last_modify . "\n"?> |
|
| 7 | 7 | * |
| 8 | 8 | * Tabela definida por 'tablename' |
| 9 | 9 | * |
| 10 | 10 | * @package <?=$objTables->getNamespace()?><?="\n"?> |
| 11 | 11 | * @subpackage DbTable |
| 12 | - * @author <?=$this->config->author."\n"?> |
|
| 12 | + * @author <?=$this->config->author . "\n"?> |
|
| 13 | 13 | * |
| 14 | - * @copyright <?=$this->config->copyright."\n"?> |
|
| 15 | - * @license <?=$this->config->license."\n"?> |
|
| 16 | - * @link <?=$this->config->link."\n"?> |
|
| 17 | - * @version <?=$this->config->version."\n"?> |
|
| 14 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
| 15 | + * @license <?=$this->config->license . "\n"?> |
|
| 16 | + * @link <?=$this->config->link . "\n"?> |
|
| 17 | + * @version <?=$this->config->version . "\n"?> |
|
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -class <?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> extends <?=$this->config->namespace?$this->config->namespace."_":""?>Model_<?=$objMakeFile->getFilesFixeds('parentClass')->getFileName() . "\n"?> |
|
| 20 | +class <?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends <?=$this->config->namespace ? $this->config->namespace . "_" : ""?>Model_<?=$objMakeFile->getFilesFixeds('parentClass')->getFileName() . "\n"?> |
|
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | 23 | * Nome da tabela do banco de dados |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | * @access protected |
| 27 | 27 | */ |
| 28 | 28 | protected $_name = '<?=$objTables->getName()?>'; |
| 29 | -<?php if($objTables->hasSchema()): ?> |
|
| 29 | +<?php if ($objTables->hasSchema()): ?> |
|
| 30 | 30 | |
| 31 | 31 | /** |
| 32 | 32 | * Schema da tabela do banco de dados |
@@ -43,9 +43,9 @@ discard block |
||
| 43 | 43 | * @var string |
| 44 | 44 | * @access protected |
| 45 | 45 | */ |
| 46 | - protected $_rowClass = '<?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?>'; |
|
| 46 | + protected $_rowClass = '<?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?>'; |
|
| 47 | 47 | |
| 48 | -<?php if( $objTables->hasPrimaryKey() ):?> |
|
| 48 | +<?php if ($objTables->hasPrimaryKey()):?> |
|
| 49 | 49 | /** |
| 50 | 50 | * Nome da Primary Key |
| 51 | 51 | * |
@@ -53,12 +53,12 @@ discard block |
||
| 53 | 53 | * @access protected |
| 54 | 54 | */ |
| 55 | 55 | protected $_primary = array( |
| 56 | -<?php foreach($objTables->getPrimaryKeys() as $pks):?> |
|
| 56 | +<?php foreach ($objTables->getPrimaryKeys() as $pks):?> |
|
| 57 | 57 | '<?=$pks->getName()?>', |
| 58 | 58 | <?php endforeach; ?> |
| 59 | 59 | ); |
| 60 | 60 | <?php endif ?> |
| 61 | -<?php if($this->config->{'folder-name'}):?> |
|
| 61 | +<?php if ($this->config->{'folder-name'}):?> |
|
| 62 | 62 | /** |
| 63 | 63 | * Initialize database adapter. |
| 64 | 64 | * |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | parent::_setupDatabaseAdapter(); |
| 74 | 74 | } |
| 75 | 75 | <?php endif ?> |
| 76 | -<?php if( $objTables->hasSequences() ) : ?> |
|
| 76 | +<?php if ($objTables->hasSequences()) : ?> |
|
| 77 | 77 | |
| 78 | 78 | /** |
| 79 | 79 | * Definir a lógica para os novos valores na chave primária. |
@@ -81,9 +81,9 @@ discard block |
||
| 81 | 81 | * |
| 82 | 82 | * @var mixed |
| 83 | 83 | */ |
| 84 | -<?php if ( 1 == count($objTables->getSequences() ) ) : ?> |
|
| 85 | -<?php if(strpos($this->config->driver, 'pgsql')): ?> |
|
| 86 | -<?php $seqs = $objTables->getSequences();reset($seqs);$seq = current($seqs);?> |
|
| 84 | +<?php if (1 == count($objTables->getSequences())) : ?> |
|
| 85 | +<?php if (strpos($this->config->driver, 'pgsql')): ?> |
|
| 86 | +<?php $seqs = $objTables->getSequences(); reset($seqs); $seq = current($seqs); ?> |
|
| 87 | 87 | protected $_sequence = '<?=$seq->getSequence() ?>'; |
| 88 | 88 | <?php else: ?> |
| 89 | 89 | protected $_sequence = true; |