public function generateCommandController($packageKey, $controllerName, $overwrite = false)
{
list($baseNamespace, $namespaceEntryPath) = $this->getPrimaryNamespaceAndEntryPath($this->packageManager->getPackage($packageKey));
$controllerName = ucfirst($controllerName) . 'Command';
$controllerClassName = $controllerName . 'Controller';
$templatePathAndFilename = 'resource://Neos.Kickstarter/Private/Generator/Controller/CommandControllerTemplate.php.tmpl';
$contextVariables = array();
$contextVariables['packageKey'] = $packageKey;
$contextVariables['packageNamespace'] = trim($baseNamespace, '\\');
$contextVariables['controllerClassName'] = $controllerClassName;
$contextVariables['controllerName'] = $controllerName;
$fileContent = $this->renderTemplate($templatePathAndFilename, $contextVariables);
$controllerFilename = $controllerClassName . '.php';
$controllerPath = Files::concatenatePaths([$namespaceEntryPath, 'Command']) . '/';
$targetPathAndFilename = $controllerPath . $controllerFilename;
$this->generateFile($targetPathAndFilename, $fileContent, $overwrite);
return $this->generatedFiles;
}