Skip to content

Commit

Permalink
fixed #16
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Sep 9, 2018
1 parent 23c54a0 commit 2998fda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/TCreateDAO.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,15 @@ public function showVO($print = false)
$this->addLine(TAB.'}');
$this->addLine();
foreach ($this->getColumns() as $k => $v) {
$this->addLine(TAB.'function set'.ucfirst($v).'( $strNewValue = null )');
$this->addLine(TAB.'public function set'.ucfirst($v).'( $strNewValue = null )');
$this->addLine(TAB."{");
if (preg_match('/cpf|cnpj/i', $v) > 0) {
$this->addLine(TAB.TAB.'$this->'.$v.' = preg_replace(\'/[^0-9]/\',\'\',$strNewValue);');
} else {
$this->addLine(TAB.TAB.'$this->'.$v.' = $strNewValue;');
}
$this->addLine(TAB."}");
$this->addLine(TAB.'function get'.ucfirst($v).'()');
$this->addLine(TAB.'public function get'.ucfirst($v).'()');
$this->addLine(TAB."{");
if (preg_match('/^data?_/i', $v) == 1) {
$this->addLine(TAB.TAB."return is_null( \$this->{$v} ) ? date( 'Y-m-d h:i:s' ) : \$this->{$v};");
Expand Down

0 comments on commit 2998fda

Please sign in to comment.