public function actionConfigTemplate(RequestApplicationInterface $app, $filePath)
    {
        $filePath = Reaction::getAlias($filePath);

        if (file_exists($filePath)) {
            $confirmPromise = $this->confirm("File '{$filePath}' already exists. Do you wish to overwrite it?");
        } else {
            $confirmPromise = resolve(true);
        }

        return $confirmPromise
            ->then(function() use ($filePath) {
                if (!copy(Reaction::getAlias('@reaction/Views/message/config.php'), $filePath)) {
                    return reject(new Exception("Configuration file template was NOT created at '{$filePath}'."));
                }
                $this->stdout("Configuration file template created at '{$filePath}'.\n\n", Console::FG_GREEN);
                return true;
            });
    }
public function actionConfigTemplate(RequestApplicationInterface $app, $filePath)
    {
        $filePath = Reaction::getAlias($filePath);

        if (file_exists($filePath)) {
            $confirmPromise = $this->confirm("File '{$filePath}' already exists. Do you wish to overwrite it?");
        } else {
            $confirmPromise = resolve(true);
        }

        return $confirmPromise
            ->then(function() use ($filePath) {
                if (!copy(Reaction::getAlias('@reaction/Views/message/config.php'), $filePath)) {
                    return reject(new Exception("Configuration file template was NOT created at '{$filePath}'."));
                }
                $this->stdout("Configuration file template created at '{$filePath}'.\n\n", Console::FG_GREEN);
                return true;
            });
    }
public function actionConfigTemplate ( RequestApplicationInterface $ app , $ filePath ) { $ filePath = Reaction :: getAlias ( $ filePath ) ; if ( file_exists ( $ filePath ) ) { $ confirmPromise = $ this -> confirm ( "File '{$filePath}' already exists. Do you wish to overwrite it?" ) ; } else { $ confirmPromise = resolve ( true ) ; } return $ confirmPromise -> then ( function ( ) use ( $ filePath ) { if ( ! copy ( Reaction :: getAlias ( '@reaction/Views/message/config.php' ) , $ filePath ) ) { return reject ( new Exception ( "Configuration file template was NOT created at '{$filePath}'." ) ) ; } $ this -> stdout ( "Configuration file template created at '{$filePath}'.\n\n" , Console :: FG_GREEN ) ; return true ; } ) ; }
Creates a configuration file template for the "extract" command.

The created configuration file contains detailed instructions on
how to customize it to fit for your needs. After customization,
you may use this configuration file with the "extract" command.

@param RequestApplicationInterface $app
@param string                      $filePath output file name or alias.
@return ExtendedPromiseInterface
Creates a configuration file template for the extract command .