@@ -3,19 +3,19 @@ |
||
3 | 3 | /** |
4 | 4 | * Mvc Model |
5 | 5 | * |
6 | - * <?=$this->config->last_modify."\n"?> |
|
6 | + * <?=$this->config->last_modify . "\n"?> |
|
7 | 7 | * |
8 | 8 | * @package <?=$this->config->namespace?>\Models |
9 | 9 | * @subpackage Model |
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 | -namespace <?=$this->config->namespace?$this->config->namespace."\\":""?>Models; |
|
18 | +namespace <?=$this->config->namespace ? $this->config->namespace . "\\" : ""?>Models; |
|
19 | 19 | |
20 | 20 | abstract class AbstractPeer |
21 | 21 | { |
@@ -3,20 +3,20 @@ |
||
3 | 3 | /** |
4 | 4 | * Data Entity implementation for this class |
5 | 5 | * |
6 | - * <?=$this->config->last_modify."\n"?> |
|
6 | + * <?=$this->config->last_modify . "\n"?> |
|
7 | 7 | * |
8 | 8 | * @package <?=$objTables->getNamespace()?> |
9 | - * @see <?=$objTables->getNamespace()?>_Entity_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?>. <?="\n"?> |
|
9 | + * @see <?=$objTables->getNamespace()?>_Entity_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?>. <?="\n"?> |
|
10 | 10 | * |
11 | - * @author <?=$this->config->author."\n"?> |
|
11 | + * @author <?=$this->config->author . "\n"?> |
|
12 | 12 | * |
13 | - * @copyright <?=$this->config->copyright."\n"?> |
|
14 | - * @license <?=$this->config->license."\n"?> |
|
15 | - * @link <?=$this->config->link."\n"?> |
|
16 | - * @version <?=$this->config->version."\n"?> |
|
13 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
14 | + * @license <?=$this->config->license . "\n"?> |
|
15 | + * @link <?=$this->config->link . "\n"?> |
|
16 | + * @version <?=$this->config->version . "\n"?> |
|
17 | 17 | */ |
18 | 18 | |
19 | -class <?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> extends <?=$objTables->getNamespace()?>_Entity_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () ). "\n"?> |
|
19 | +class <?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends <?=$objTables->getNamespace()?>_Entity_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName()) . "\n"?> |
|
20 | 20 | { |
21 | 21 | /* @TODO Codifique aqui */ |
22 | 22 | } |
@@ -3,18 +3,18 @@ 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 | * Classe Abstract pai de todas as tabelas |
9 | 9 | * |
10 | 10 | * @package <?=$this->config->namespace?>Model |
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 | * @abstract |
20 | 20 | */ |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | * Zend DB Table Abstract class |
24 | 24 | */ |
25 | 25 | |
26 | -abstract class <?=$this->config->namespace?$this->config->namespace."_":""?>Model_TableAbstract extends Zend_Db_Table_Abstract |
|
26 | +abstract class <?=$this->config->namespace ? $this->config->namespace . "_" : ""?>Model_TableAbstract extends Zend_Db_Table_Abstract |
|
27 | 27 | { |
28 | 28 | /** |
29 | 29 | * Nome da tabela do banco de dados |
@@ -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->getParentClass() . "\n"?> |
|
20 | +class <?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends <?=$this->config->namespace ? $this->config->namespace . "_" : ""?>Model_<?=$objMakeFile->getParentClass() . "\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; |
@@ -3,19 +3,19 @@ discard block |
||
3 | 3 | /** |
4 | 4 | * Application Entity |
5 | 5 | * |
6 | - * <?=$this->config->last_modify."\n"?> |
|
6 | + * <?=$this->config->last_modify . "\n"?> |
|
7 | 7 | * |
8 | 8 | * @package <?=$this->config->namespace?>Model |
9 | 9 | * @subpackage Model |
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 | -abstract class <?=$this->config->namespace?$this->config->namespace."_":""?>Model_EntityAbstract extends Zend_Db_Table_Row_Abstract |
|
18 | +abstract class <?=$this->config->namespace ? $this->config->namespace . "_" : ""?>Model_EntityAbstract extends Zend_Db_Table_Row_Abstract |
|
19 | 19 | { |
20 | 20 | |
21 | 21 | /** |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | /** |
77 | 77 | * @param array $data |
78 | - * @return <?=$this->config->namespace?$this->config->namespace."_":""?>>Model_EntityAbstract |
|
78 | + * @return <?=$this->config->namespace ? $this->config->namespace . "_" : ""?>>Model_EntityAbstract |
|
79 | 79 | */ |
80 | 80 | public static function getIntance($data = array()) |
81 | 81 | { |
@@ -18,8 +18,8 @@ |
||
18 | 18 | protected $parentFileTpl = "peer_abstract.php"; |
19 | 19 | protected $fileTpl = "peer.php"; |
20 | 20 | |
21 | - public function parseRelation ( \Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable ) |
|
21 | + public function parseRelation(\Classes\MakerFile $makerFile, \Classes\Db\DbTable $dbTable) |
|
22 | 22 | { |
23 | - return array (); |
|
23 | + return array(); |
|
24 | 24 | } |
25 | 25 | } |