/** * Generate model class code * * @param Module $module * @param string $modelName * @param array $arrayValues * @return string */ protected function generateCode(Module $module, $modelName, $arrayValues) { $replaces = array('<namespace>' => 'namespace ' . $module->getNamespace() . '\\Model;', '<modelAnnotation>' => $this->generateDocBlock($modelName), '<modelClassName>' => $modelName, '<construct>' => self::$constructorMethodTemplate, '<modelBody>' => $this->generateBody($modelName, $arrayValues), '<spaces>' => " ", '<table>' => strtolower($modelName)); $classTemplate = str_replace(array_keys($replaces), array_values($replaces), self::$classTemplate); return $classTemplate; }