<?php } ?> /** * Casts values of int fields to (int) * @return <?php echo $class_name; ?> */ function castInts() { <?php foreach ($fields as $key => $field) { if (Model::isIntegerType($field->getType())) { ?> $this-><?php echo $field->getName(); ?> = (null === $this-><?php echo $field->getName(); ?> ) ? null : (int) $this-><?php echo $field->getName(); ?> ; <?php } } ?>