public function save($fieldValues) { foreach ($fieldValues as $key => $value) { if (isset($this->data[$key])) { $this->data[$key] = $value; } } $output = sprintf('<?php /*************************************************************** * Extension Manager/Repository config file for ext: "%s" * * Auto generated by famelo/soup %s * * Manual updates: * Only the data in the array - anything else is removed by next write. * "version" and "dependencies" must not be touched! ***************************************************************/ $EM_CONF[$_EXTKEY] = %s;', basename(WORKING_DIRECTORY), date('Y-m-d'), var_export($this->data, TRUE)); file_put_contents('ext_emconf.php', $output); $namespace = ''; if (!empty($fieldValues['company'])) { $namespace = $fieldValues['company'] . '\\'; } $namespace .= String::underscoreToCamelcase($fieldValues['extension_key']) . '\\'; $this->composer->setNamespace($namespace, 'Classes/'); $this->composer->save(); }