@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | |
25 | 25 | const SEPARETOR = "_"; |
26 | 26 | |
27 | - protected function init () |
|
27 | + protected function init() |
|
28 | 28 | { |
29 | 29 | } |
30 | 30 | |
@@ -33,75 +33,75 @@ discard block |
||
33 | 33 | * |
34 | 34 | * @return array |
35 | 35 | */ |
36 | - protected function getParams () |
|
36 | + protected function getParams() |
|
37 | 37 | { |
38 | - if ( ! $this->config or !$this->isValidFrameworkFiles ()) |
|
38 | + if ( ! $this->config or ! $this->isValidFrameworkFiles()) |
|
39 | 39 | { |
40 | - return array (); |
|
40 | + return array(); |
|
41 | 41 | } |
42 | 42 | |
43 | - return array ( |
|
43 | + return array( |
|
44 | 44 | //Driver do banco de dados |
45 | - 'driver' => $this->config[ 'adapter' ] , |
|
45 | + 'driver' => $this->config['adapter'], |
|
46 | 46 | //Nome do banco de dados |
47 | - 'database' => $this->config[ 'params' ][ 'dbname' ] , |
|
47 | + 'database' => $this->config['params']['dbname'], |
|
48 | 48 | //Host do banco |
49 | - 'host' => $this->config[ 'params' ][ 'host' ] , |
|
49 | + 'host' => $this->config['params']['host'], |
|
50 | 50 | //Port do banco |
51 | - 'port' => isset( $this->config[ 'params' ][ 'port' ] ) |
|
52 | - ? $this->config[ 'params' ][ 'port' ] : '' , |
|
51 | + 'port' => isset($this->config['params']['port']) |
|
52 | + ? $this->config['params']['port'] : '', |
|
53 | 53 | //usuario do banco |
54 | - 'username' => $this->config[ 'params' ][ 'username' ] , |
|
54 | + 'username' => $this->config['params']['username'], |
|
55 | 55 | //senha do banco |
56 | - 'password' => $this->config[ 'params' ][ 'password' ] , |
|
56 | + 'password' => $this->config['params']['password'], |
|
57 | 57 | ); |
58 | 58 | } |
59 | 59 | |
60 | - protected function parseFrameworkConfig () |
|
60 | + protected function parseFrameworkConfig() |
|
61 | 61 | { |
62 | - if(!$this->isValidFrameworkFiles ()){ |
|
62 | + if ( ! $this->isValidFrameworkFiles()) { |
|
63 | 63 | return; |
64 | 64 | } |
65 | 65 | |
66 | - $frameworkIni = $this->getFrameworkIni (); |
|
66 | + $frameworkIni = $this->getFrameworkIni(); |
|
67 | 67 | |
68 | 68 | require_once 'Zend/Config/Ini.php'; |
69 | 69 | |
70 | 70 | $objConfig = new \Zend_Config_Ini( |
71 | - realpath ( $frameworkIni ) , $this->getEnvironment () |
|
71 | + realpath($frameworkIni), $this->getEnvironment() |
|
72 | 72 | ); |
73 | 73 | |
74 | - $arrConfig = $objConfig->toArray (); |
|
74 | + $arrConfig = $objConfig->toArray(); |
|
75 | 75 | |
76 | - if ( isset( $arrConfig[ 'resources' ][ 'db' ] ) ) |
|
76 | + if (isset($arrConfig['resources']['db'])) |
|
77 | 77 | { |
78 | - $this->config = $arrConfig[ 'resources' ][ 'db' ]; |
|
78 | + $this->config = $arrConfig['resources']['db']; |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
82 | - public function createClassNamespace ( $table ) |
|
82 | + public function createClassNamespace($table) |
|
83 | 83 | { |
84 | - $arrNames = array ( |
|
85 | - $this->arrConfig[ 'namespace' ] , |
|
84 | + $arrNames = array( |
|
85 | + $this->arrConfig['namespace'], |
|
86 | 86 | 'Model' |
87 | 87 | ); |
88 | 88 | |
89 | - if ( isset( $this->arrConfig['folder-database'] ) |
|
89 | + if (isset($this->arrConfig['folder-database']) |
|
90 | 90 | && $this->arrConfig['folder-database'] |
91 | 91 | ) |
92 | 92 | { |
93 | - $arrNames[] = AbstractMaker::getClassName ( $this->arrConfig['driver'] ); |
|
93 | + $arrNames[] = AbstractMaker::getClassName($this->arrConfig['driver']); |
|
94 | 94 | } |
95 | 95 | |
96 | - if ( $table->hasSchema () ) |
|
96 | + if ($table->hasSchema()) |
|
97 | 97 | { |
98 | - $arrNames[] = AbstractMaker::getClassName ( $table->getSchema () ); |
|
98 | + $arrNames[] = AbstractMaker::getClassName($table->getSchema()); |
|
99 | 99 | } else |
100 | 100 | { |
101 | - $arrNames[] = AbstractMaker::getClassName ( $table->getDatabase () ); |
|
101 | + $arrNames[] = AbstractMaker::getClassName($table->getDatabase()); |
|
102 | 102 | } |
103 | 103 | |
104 | - return implode ( self::SEPARETOR , array_filter ( $arrNames ) ); |
|
104 | + return implode(self::SEPARETOR, array_filter($arrNames)); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | /** |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | * |
110 | 110 | * @return AbstractAdapter[] |
111 | 111 | */ |
112 | - public function getMakeFileInstances () |
|
112 | + public function getMakeFileInstances() |
|
113 | 113 | { |
114 | - return array ( |
|
115 | - DbTable::getInstance () , |
|
116 | - Entity::getInstance () , |
|
117 | - Model::getInstance () |
|
114 | + return array( |
|
115 | + DbTable::getInstance(), |
|
116 | + Entity::getInstance(), |
|
117 | + Model::getInstance() |
|
118 | 118 | ); |
119 | 119 | } |
120 | 120 |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | |
23 | 23 | const SEPARETOR = "_"; |
24 | 24 | |
25 | - protected function init () |
|
25 | + protected function init() |
|
26 | 26 | { |
27 | 27 | } |
28 | 28 | |
@@ -31,31 +31,31 @@ discard block |
||
31 | 31 | * |
32 | 32 | * @return array |
33 | 33 | */ |
34 | - protected function getParams () |
|
34 | + protected function getParams() |
|
35 | 35 | { |
36 | 36 | |
37 | 37 | } |
38 | 38 | |
39 | - protected function parseFrameworkConfig () |
|
39 | + protected function parseFrameworkConfig() |
|
40 | 40 | { |
41 | 41 | // TODO: Implement parseFrameworkConfig() method. |
42 | 42 | } |
43 | 43 | |
44 | - public function createClassNamespace ( $table ) |
|
44 | + public function createClassNamespace($table) |
|
45 | 45 | { |
46 | - $arrNames = array ( |
|
47 | - $this->arrConfig[ 'namespace' ], |
|
46 | + $arrNames = array( |
|
47 | + $this->arrConfig['namespace'], |
|
48 | 48 | 'Model' |
49 | 49 | ); |
50 | - if ( $table->hasSchema () ) |
|
50 | + if ($table->hasSchema()) |
|
51 | 51 | { |
52 | - $arrNames[] = AbstractMaker::getClassName ( $table->getSchema () ); |
|
52 | + $arrNames[] = AbstractMaker::getClassName($table->getSchema()); |
|
53 | 53 | } else |
54 | 54 | { |
55 | - $arrNames[] = AbstractMaker::getClassName ( $table->getDatabase() ); |
|
55 | + $arrNames[] = AbstractMaker::getClassName($table->getDatabase()); |
|
56 | 56 | } |
57 | 57 | |
58 | - return implode ( '_', array_filter ( $arrNames ) ); |
|
58 | + return implode('_', array_filter($arrNames)); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -63,12 +63,12 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @return AbstractAdapter[] |
65 | 65 | */ |
66 | - public function getMakeFileInstances () |
|
66 | + public function getMakeFileInstances() |
|
67 | 67 | { |
68 | - return array ( |
|
69 | - DbTable::getInstance (), |
|
70 | - Entity::getInstance (), |
|
71 | - Model::getInstance () |
|
68 | + return array( |
|
69 | + DbTable::getInstance(), |
|
70 | + Entity::getInstance(), |
|
71 | + Model::getInstance() |
|
72 | 72 | ); |
73 | 73 | } |
74 | 74 |
@@ -16,9 +16,9 @@ |
||
16 | 16 | { |
17 | 17 | private $msg = "As configuracoes a seguir sao obrigatorias: \033[0;31m%value%\033[0m"; |
18 | 18 | |
19 | - public function __construct ( $array , $code = 0 ) |
|
19 | + public function __construct($array, $code = 0) |
|
20 | 20 | { |
21 | - $attribs = implode ( ', ' , array_keys ( $array ) ); |
|
22 | - parent::__construct ( str_replace ( "%value%" , $attribs , $this->msg ) , (int) $code ); |
|
21 | + $attribs = implode(', ', array_keys($array)); |
|
22 | + parent::__construct(str_replace("%value%", $attribs, $this->msg), (int) $code); |
|
23 | 23 | } |
24 | 24 | } |
25 | 25 | \ No newline at end of file |
@@ -3,20 +3,20 @@ 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"?> |
|
14 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
15 | + * @license <?=$this->config->license . "\n"?> |
|
16 | + * @link <?=$this->config->link . "\n"?> |
|
17 | 17 | */ |
18 | 18 | |
19 | -class <?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> extends <?=$this->config->namespace?>Model_<?=$objMakeFile->getParentClass() . "\n"?> |
|
19 | +class <?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends <?=$this->config->namespace?>Model_<?=$objMakeFile->getParentClass() . "\n"?> |
|
20 | 20 | { |
21 | 21 | /** |
22 | 22 | * Nome da tabela do banco de dados |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | * @access protected |
26 | 26 | */ |
27 | 27 | protected $_name = '<?=$objTables->getName()?>'; |
28 | -<?php if($objTables->hasSchema()): ?> |
|
28 | +<?php if ($objTables->hasSchema()): ?> |
|
29 | 29 | |
30 | 30 | /** |
31 | 31 | * Schema da tabela do banco de dados |
@@ -42,9 +42,9 @@ discard block |
||
42 | 42 | * @var string |
43 | 43 | * @access protected |
44 | 44 | */ |
45 | - protected $_rowClass = '<?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?>'; |
|
45 | + protected $_rowClass = '<?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?>'; |
|
46 | 46 | |
47 | -<?php if( $objTables->hasPrimaryKey() ):?> |
|
47 | +<?php if ($objTables->hasPrimaryKey()):?> |
|
48 | 48 | /** |
49 | 49 | * Nome da Primary Key |
50 | 50 | * |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | * @access protected |
53 | 53 | */ |
54 | 54 | protected $_primary = array( |
55 | -<?php foreach($objTables->getPrimaryKeys() as $pks):?> |
|
55 | +<?php foreach ($objTables->getPrimaryKeys() as $pks):?> |
|
56 | 56 | '<?=$pks->getName()?>', |
57 | 57 | <?php endforeach; ?> |
58 | 58 | ); |
@@ -63,9 +63,9 @@ discard block |
||
63 | 63 | * |
64 | 64 | * @var mixed |
65 | 65 | */ |
66 | -<?php if( $objTables->hasSequences() ) : ?> |
|
67 | -<?php elseif ( 1 == count($objTables->getSequences() ) ) : ?> |
|
68 | -<?php $seqs = $objTables->getSequences();reset($seqs);$seq = current($seqs);?> |
|
66 | +<?php if ($objTables->hasSequences()) : ?> |
|
67 | +<?php elseif (1 == count($objTables->getSequences())) : ?> |
|
68 | +<?php $seqs = $objTables->getSequences(); reset($seqs); $seq = current($seqs); ?> |
|
69 | 69 | protected $_sequence = '<?=$seq->getSequence() ?>'; |
70 | 70 | <?php else: ?> |
71 | 71 | protected $_sequence = false; |
@@ -1,19 +1,19 @@ discard block |
||
1 | 1 | <?="<?php\n"?> |
2 | -<?php $className = $objTables->getNamespace(). '_Entity_' . \Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> |
|
2 | +<?php $className = $objTables->getNamespace() . '_Entity_' . \Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> |
|
3 | 3 | |
4 | 4 | /** |
5 | 5 | * Application Entity |
6 | 6 | * |
7 | - * <?=$this->config->last_modify."\n"?> |
|
7 | + * <?=$this->config->last_modify . "\n"?> |
|
8 | 8 | * |
9 | - * @package <?=$objTables->getNamespace()."\n"?> |
|
9 | + * @package <?=$objTables->getNamespace() . "\n"?> |
|
10 | 10 | * @subpackage Entity |
11 | 11 | * |
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"?> |
|
14 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
15 | + * @license <?=$this->config->license . "\n"?> |
|
16 | + * @link <?=$this->config->link . "\n"?> |
|
17 | 17 | */ |
18 | 18 | |
19 | 19 | /** |
@@ -25,11 +25,11 @@ discard block |
||
25 | 25 | |
26 | 26 | <?php foreach ($objTables->getColumns() as $column): ?> |
27 | 27 | /** |
28 | - * Database constraint in the column <?=$column->getName()."\n"?> |
|
28 | + * Database constraint in the column <?=$column->getName() . "\n"?> |
|
29 | 29 | * |
30 | 30 | */ |
31 | 31 | const <?=strtoupper($column->getName())?> = '<?=$objTables->getName()?>.<?=$column->getName()?>'; |
32 | -<?php endforeach;?> |
|
32 | +<?php endforeach; ?> |
|
33 | 33 | |
34 | 34 | /** |
35 | 35 | * Nome da tabela DbTable do model |
@@ -37,16 +37,16 @@ discard block |
||
37 | 37 | * @var string |
38 | 38 | * @access protected |
39 | 39 | */ |
40 | - protected $_tableClass = '<?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?>'; |
|
40 | + protected $_tableClass = '<?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?>'; |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @see <?=$this->config->namespace?>Model_EntityAbstract::$_filters |
44 | 44 | */ |
45 | 45 | protected $_filters = array( |
46 | -<?php foreach ( $objTables->getColumns () as $column ): ?> |
|
46 | +<?php foreach ($objTables->getColumns() as $column): ?> |
|
47 | 47 | <?php |
48 | 48 | $filters = null; |
49 | - switch ( ucfirst ( $column->getType () ) ) |
|
49 | + switch (ucfirst($column->getType())) |
|
50 | 50 | { |
51 | 51 | case 'String': |
52 | 52 | $filters = 'StripTags", "StringTrim'; |
@@ -55,50 +55,50 @@ discard block |
||
55 | 55 | $filters = 'Digits'; |
56 | 56 | break; |
57 | 57 | default: |
58 | - $filters = ucfirst ( $column->getType () ); |
|
58 | + $filters = ucfirst($column->getType()); |
|
59 | 59 | break; |
60 | 60 | } |
61 | 61 | ?> |
62 | 62 | '<?=$column->getName()?>'=>array ( |
63 | - <?=( !empty( $filters ) ) ? "\"{$filters}\"\n" : null; ?> |
|
63 | + <?=( ! empty($filters)) ? "\"{$filters}\"\n" : null; ?> |
|
64 | 64 | ), |
65 | -<?php endforeach;?> |
|
65 | +<?php endforeach; ?> |
|
66 | 66 | ); |
67 | 67 | |
68 | 68 | /** |
69 | 69 | * @see <?=$this->config->namespace?>Model_EntityAbstract::$_validators |
70 | 70 | */ |
71 | 71 | protected $_validators= array( |
72 | -<?php foreach ( $objTables->getColumns () as $column ): ?> |
|
72 | +<?php foreach ($objTables->getColumns() as $column): ?> |
|
73 | 73 | <?php |
74 | - $validators = array (); |
|
74 | + $validators = array(); |
|
75 | 75 | |
76 | - $validators[] = $column->isNullable () ? "'allowEmpty' => true" : "'NotEmpty'"; |
|
76 | + $validators[] = $column->isNullable() ? "'allowEmpty' => true" : "'NotEmpty'"; |
|
77 | 77 | |
78 | - switch ( ucfirst ( $column->getType () ) ) |
|
78 | + switch (ucfirst($column->getType())) |
|
79 | 79 | { |
80 | 80 | case 'String': |
81 | - if ( $column->getMaxLength () ) |
|
81 | + if ($column->getMaxLength()) |
|
82 | 82 | { |
83 | - $validators[] = "array( 'StringLength', array( 'max' => " . $column->getMaxLength () . " ) )"; |
|
83 | + $validators[] = "array( 'StringLength', array( 'max' => " . $column->getMaxLength() . " ) )"; |
|
84 | 84 | } |
85 | 85 | |
86 | 86 | break; |
87 | 87 | case 'Boolean': |
88 | 88 | break; |
89 | 89 | default: |
90 | - $name = ucfirst ( $column->getType () ); |
|
90 | + $name = ucfirst($column->getType()); |
|
91 | 91 | $validators[] = "'$name'"; |
92 | 92 | break; |
93 | 93 | } |
94 | - $validators = implode ( ", ", $validators )?> |
|
95 | - '<?= $column->getName () ?>' => array ( |
|
96 | - <?=( !empty( $validators ) ) ? "{$validators}\n" : null?> |
|
94 | + $validators = implode(", ", $validators)?> |
|
95 | + '<?= $column->getName() ?>' => array ( |
|
96 | + <?=( ! empty($validators)) ? "{$validators}\n" : null?> |
|
97 | 97 | ), |
98 | 98 | <?php endforeach; ?> |
99 | 99 | ); |
100 | 100 | |
101 | -<?php if( $objTables->hasPrimaryKey() ):?> |
|
101 | +<?php if ($objTables->hasPrimaryKey()):?> |
|
102 | 102 | /** |
103 | 103 | * Nome da Primary Key |
104 | 104 | * |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | */ |
108 | 108 | |
109 | 109 | protected $_primary = array( |
110 | - <?php foreach($objTables->getPrimarykeys() as $pks) : ?> |
|
110 | + <?php foreach ($objTables->getPrimarykeys() as $pks) : ?> |
|
111 | 111 | '<?=$pks->getName()?>', |
112 | 112 | <?php endforeach ?> |
113 | 113 | ); |
@@ -121,7 +121,7 @@ discard block |
||
121 | 121 | */ |
122 | 122 | protected $_parent_<?=$parent['name']?>; |
123 | 123 | |
124 | -<?php endforeach;?> |
|
124 | +<?php endforeach; ?> |
|
125 | 125 | <?php foreach ($depends as $depend): ?> |
126 | 126 | /** |
127 | 127 | * Depends relation <?=\Classes\Maker\AbstractMaker::getClassName($depend['table']) . "\n"?> |
@@ -130,13 +130,13 @@ discard block |
||
130 | 130 | */ |
131 | 131 | protected $_depend_<?=$depend['name']?>; |
132 | 132 | |
133 | -<?php endforeach;?> |
|
133 | +<?php endforeach; ?> |
|
134 | 134 | <?php foreach ($objTables->getColumns() as $column): ?> |
135 | 135 | /** |
136 | 136 | * |
137 | - * Sets column <?=$column->getName()."\n"?> |
|
137 | + * Sets column <?=$column->getName() . "\n"?> |
|
138 | 138 | * |
139 | -<?php if ($column->getType()=='date'): ?> |
|
139 | +<?php if ($column->getType() == 'date'): ?> |
|
140 | 140 | * Stored in ISO 8601 format. |
141 | 141 | * |
142 | 142 | * @param string|Zend_Date $<?=$column->getName() . "\n"?> |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function set<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>($<?=$column->getName()?>) |
149 | 149 | { |
150 | -<?php switch ( $column->getType () ): |
|
150 | +<?php switch ($column->getType()): |
|
151 | 151 | case 'date': ?> |
152 | 152 | if (! empty($<?=$column->getName()?>)) |
153 | 153 | { |
@@ -186,16 +186,16 @@ discard block |
||
186 | 186 | /** |
187 | 187 | * Gets column <?=$column->getName() . "\n"?> |
188 | 188 | * |
189 | -<?php if ($column->getType()=='date'): ?> |
|
189 | +<?php if ($column->getType() == 'date'): ?> |
|
190 | 190 | * @param boolean $returnZendDate |
191 | 191 | * @return Zend_Date|null|string Zend_Date representation of this datetime if enabled, or ISO 8601 string if not |
192 | 192 | <?php else: ?> |
193 | 193 | * @return <?=$column->getType() . "\n"?> |
194 | 194 | <?php endif; ?> |
195 | 195 | */ |
196 | - public function get<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>(<?php if ($column->getType()=='date'): ?>$returnZendDate = false <?php endif;?>) |
|
196 | + public function get<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>(<?php if ($column->getType() == 'date'): ?>$returnZendDate = false <?php endif; ?>) |
|
197 | 197 | { |
198 | -<?php if ($column->getType()=='date'): ?> |
|
198 | +<?php if ($column->getType() == 'date'): ?> |
|
199 | 199 | if ($returnZendDate) |
200 | 200 | { |
201 | 201 | if ($this->_data['<?=$column->getName()?>'] === null) |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | { |
222 | 222 | if ($this->_parent_<?=$parent['name']?> === null) |
223 | 223 | { |
224 | - $this->_parent_<?=$parent['name']?> = $this->findParentRow('<?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName ($parent['table'])?>', '<?=\Classes\Maker\AbstractMaker::getClassName($parent['name'])?>'); |
|
224 | + $this->_parent_<?=$parent['name']?> = $this->findParentRow('<?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName($parent['table'])?>', '<?=\Classes\Maker\AbstractMaker::getClassName($parent['name'])?>'); |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | return $this->_parent_<?=$parent['name']?>; |
@@ -240,7 +240,7 @@ discard block |
||
240 | 240 | { |
241 | 241 | if ($this->_depend_<?=$depend['name']?> === null) |
242 | 242 | { |
243 | - $this->_depend_<?=$depend['name']?> = $this->findDependentRowset('<?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName ($depend['table'])?>'); |
|
243 | + $this->_depend_<?=$depend['name']?> = $this->findDependentRowset('<?=$objTables->getNamespace()?>_DbTable_<?=\Classes\Maker\AbstractMaker::getClassName($depend['table'])?>'); |
|
244 | 244 | } |
245 | 245 | |
246 | 246 | return $this->_depend_<?=$depend['name']?>; |
@@ -140,9 +140,12 @@ discard block |
||
140 | 140 | * Stored in ISO 8601 format. |
141 | 141 | * |
142 | 142 | * @param string|Zend_Date $<?=$column->getName() . "\n"?> |
143 | -<?php else: ?> |
|
143 | +<?php else { |
|
144 | + : ?> |
|
144 | 145 | * @param <?=$column->getType()?> $<?=$column->getName() . "\n"?> |
145 | -<?php endif; ?> |
|
146 | +<?php endif; |
|
147 | +} |
|
148 | +?> |
|
146 | 149 | * @return <?=$className . "\n"?> |
147 | 150 | */ |
148 | 151 | public function set<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>($<?=$column->getName()?>) |
@@ -189,9 +192,12 @@ discard block |
||
189 | 192 | <?php if ($column->getType()=='date'): ?> |
190 | 193 | * @param boolean $returnZendDate |
191 | 194 | * @return Zend_Date|null|string Zend_Date representation of this datetime if enabled, or ISO 8601 string if not |
192 | -<?php else: ?> |
|
195 | +<?php else { |
|
196 | + : ?> |
|
193 | 197 | * @return <?=$column->getType() . "\n"?> |
194 | -<?php endif; ?> |
|
198 | +<?php endif; |
|
199 | +} |
|
200 | +?> |
|
195 | 201 | */ |
196 | 202 | public function get<?=\Classes\Maker\AbstractMaker::getClassName($column->getName())?>(<?php if ($column->getType()=='date'): ?>$returnZendDate = false <?php endif;?>) |
197 | 203 | { |
@@ -3,19 +3,19 @@ |
||
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"?> |
|
13 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
14 | + * @license <?=$this->config->license . "\n"?> |
|
15 | + * @link <?=$this->config->link . "\n"?> |
|
16 | 16 | */ |
17 | 17 | |
18 | -class <?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> extends <?=$objTables->getNamespace()?>_Entity_<?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () ). "\n"?> |
|
18 | +class <?=$objTables->getNamespace()?>_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends <?=$objTables->getNamespace()?>_Entity_<?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName()) . "\n"?> |
|
19 | 19 | { |
20 | 20 | /* Codifique aqui */ |
21 | 21 | } |
@@ -3,15 +3,15 @@ |
||
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"?> |
|
12 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
13 | + * @license <?=$this->config->license . "\n"?> |
|
14 | + * @link <?=$this->config->link . "\n"?> |
|
15 | 15 | */ |
16 | 16 | |
17 | 17 | abstract class <?=$this->config->namespace?>Model_EntityAbstract extends Zend_Db_Table_Row_Abstract |
@@ -3,19 +3,19 @@ |
||
3 | 3 | /** |
4 | 4 | * Data Model 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()?>/Model/<?=$this->getClassName ( $objTables->getName () )?>. "\n"?> |
|
9 | + * @see <?=$objTables->getNamespace()?>/Model/<?=$this->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"?> |
|
13 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
14 | + * @license <?=$this->config->license . "\n"?> |
|
15 | + * @link <?=$this->config->link . "\n"?> |
|
16 | 16 | */ |
17 | 17 | |
18 | -class <?=$this->getClassName ( $objTables->getName () )?> extends <?=$objTables->getNamespace()?>/Model/<?=$this->getClassName ( $objTables->getName () ). "\n"?> |
|
18 | +class <?=$this->getClassName($objTables->getName())?> extends <?=$objTables->getNamespace()?>/Model/<?=$this->getClassName($objTables->getName()) . "\n"?> |
|
19 | 19 | { |
20 | 20 | /* Codifique aqui */ |
21 | 21 | } |
@@ -3,22 +3,22 @@ |
||
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?>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"?> |
|
12 | + * @copyright <?=$this->config->copyright . "\n"?> |
|
13 | + * @license <?=$this->config->license . "\n"?> |
|
14 | + * @link <?=$this->config->link . "\n"?> |
|
15 | 15 | */ |
16 | 16 | |
17 | 17 | namespace <?=$objTables->getNamespace()?>; |
18 | 18 | |
19 | 19 | use Phalcon\Mvc\Model; |
20 | 20 | |
21 | -abstract class <?=\Classes\Maker\AbstractMaker::getClassName ( $objTables->getName () )?> extends Model |
|
21 | +abstract class <?=\Classes\Maker\AbstractMaker::getClassName($objTables->getName())?> extends Model |
|
22 | 22 | { |
23 | 23 | |
24 | 24 | } |
25 | 25 | \ No newline at end of file |