/** * Collect all necessary informations * * @throws \Exception * @return void */ public function action() { if (!$this->getopt->target_path) { throw new \Exception('You must enter a target path (absolute)'); } Registry::set('targetPath', $this->getopt->target_path); }
/** * Constructor */ public function __construct() { $this->cliStdio = Registry::getObject('cliStdio'); $this->configuration = Registry::get('configuration'); $this->newProjectKey = \strtoupper(\trim(\str_replace(' ', '_', Registry::get('projectKey')))); return $this; }
/** * Run tasks * * @throw \Exception * @return void */ public function runTasks() { try { $this->collectInformation(); # Renamer (new \Aijko\Typo3Helper\Task\Renamer\Typo3\RenameContentTask())->execute(Registry::get('targetPath')); $this->cliStdio->outln(''); $this->cliStdio->outln('Finish'); } catch (\Exception $e) { $this->cliStdio->errln($e->getMessage()); } }