2121namespace Phalcon \Builder ;
2222
2323use Phalcon \Text ;
24+ use Phalcon \Utils ;
2425use Phalcon \Builder \Model as ModelBuilder ;
2526use Phalcon \DI \FactoryDefault ;
2627use Phalcon \Db \Column ;
@@ -277,7 +278,7 @@ private function _captureFilterInput($var, $fields, $useGetSetters, $identityFie
277278 }
278279 }
279280
280- $ code .= '$ ' . Text:: camelize ($ var , '- ' ) . '-> ' ;
281+ $ code .= '$ ' . Utils:: lowerCamelizeWithDelimiter ($ var , '- ' , true ) . '-> ' ;
281282 if ($ useGetSetters ) {
282283 $ code .= 'set ' . Text::camelize ($ field ) . '( ' . $ fieldCode . ') ' ;
283284 } else {
@@ -307,7 +308,7 @@ private function _assignTagDefaults($var, $fields, $useGetSetters)
307308 $ accessor = $ field ;
308309 }
309310
310- $ code .= '$this->tag->setDefault(" ' . $ field . '", $ ' . Text:: camelize ($ var , '- ' ) . '-> ' . $ accessor . '); ' . PHP_EOL . "\t\t\t" ;
311+ $ code .= '$this->tag->setDefault(" ' . $ field . '", $ ' . Utils:: lowerCamelizeWithDelimiter ($ var , '- ' , true ) . '-> ' . $ accessor . '); ' . PHP_EOL . "\t\t\t" ;
311312 }
312313
313314 return $ code ;
@@ -491,10 +492,10 @@ private function _makeController()
491492
492493 $ code = str_replace ('$fullyQualifiedModelName$ ' , $ this ->options ->get ('modelClass ' ), $ code );
493494
494- $ code = str_replace ('$singularVar$ ' , '$ ' . Text:: camelize ($ this ->options ->get ('singular ' ), '- ' ), $ code );
495+ $ code = str_replace ('$singularVar$ ' , '$ ' . Utils:: lowerCamelizeWithDelimiter ($ this ->options ->get ('singular ' ), '- ' , true ), $ code );
495496 $ code = str_replace ('$singular$ ' , $ this ->options ->get ('singular ' ), $ code );
496497
497- $ code = str_replace ('$pluralVar$ ' , '$ ' . Text:: camelize ($ this ->options ->get ('plural ' ), '- ' ), $ code );
498+ $ code = str_replace ('$pluralVar$ ' , '$ ' . Utils:: lowerCamelizeWithDelimiter ($ this ->options ->get ('plural ' ), '- ' , true ), $ code );
498499 $ code = str_replace ('$plural$ ' , $ this ->options ->get ('plural ' ), $ code );
499500
500501 $ code = str_replace ('$className$ ' , $ this ->options ->get ('className ' ), $ code );
@@ -726,7 +727,7 @@ private function _makeViewSearch()
726727 $ rowCode .= "\t\t\t" . '<td><?php echo ' ;
727728 if (!isset ($ this ->options ->allReferences [$ fieldName ])) {
728729 if ($ this ->options ->genSettersGetters ) {
729- $ rowCode .= '$ ' . Text:: camelize ($ this ->options ->singular , '- ' ) . '->get ' . Text::camelize ($ fieldName ) . '() ' ;
730+ $ rowCode .= '$ ' . Utils:: lowerCamelizeWithDelimiter ($ this ->options ->singular , '- ' , true ) . '->get ' . Text::camelize ($ fieldName ) . '() ' ;
730731 } else {
731732 $ rowCode .= '$ ' . $ this ->options ->singular . '-> ' . $ fieldName ;
732733 }
@@ -747,7 +748,7 @@ private function _makeViewSearch()
747748 $ code = str_replace ('$plural$ ' , $ this ->options ->plural , $ code );
748749 $ code = str_replace ('$headerColumns$ ' , $ headerCode , $ code );
749750 $ code = str_replace ('$rowColumns$ ' , $ rowCode , $ code );
750- $ code = str_replace ('$singularVar$ ' , '$ ' . Text:: camelize ($ this ->options ->singular , '- ' ), $ code );
751+ $ code = str_replace ('$singularVar$ ' , '$ ' . Utils:: lowerCamelizeWithDelimiter ($ this ->options ->singular , '- ' , true ), $ code );
751752 $ code = str_replace ('$pk$ ' , $ idField , $ code );
752753
753754 if ($ this ->isConsole ()) {
@@ -791,7 +792,7 @@ private function _makeViewSearchVolt()
791792 $ rowCode .= "\t\t\t" . '<td>{{ ' ;
792793 if (!isset ($ this ->options ->allReferences [$ fieldName ])) {
793794 if ($ this ->options ->contains ('genSettersGetters ' )) {
794- $ rowCode .= Text:: camelize ($ this ->options ->singular , '- ' ) . '.get ' . Text::camelize ($ fieldName ) . '() ' ;
795+ $ rowCode .= Utils:: lowerCamelizeWithDelimiter ($ this ->options ->singular , '- ' , true ) . '.get ' . Text::camelize ($ fieldName ) . '() ' ;
795796 } else {
796797 $ rowCode .= $ this ->options ->singular . '. ' . $ fieldName ;
797798 }
@@ -812,7 +813,7 @@ private function _makeViewSearchVolt()
812813 $ code = str_replace ('$plural$ ' , $ this ->options ->plural , $ code );
813814 $ code = str_replace ('$headerColumns$ ' , $ headerCode , $ code );
814815 $ code = str_replace ('$rowColumns$ ' , $ rowCode , $ code );
815- $ code = str_replace ('$singularVar$ ' , Text:: camelize ($ this ->options ->singular , '- ' ), $ code );
816+ $ code = str_replace ('$singularVar$ ' , Utils:: lowerCamelizeWithDelimiter ($ this ->options ->singular , '- ' , true ), $ code );
816817 $ code = str_replace ('$pk$ ' , $ idField , $ code );
817818
818819 if ($ this ->isConsole ()) {
0 commit comments