diff --git a/composer.json b/composer.json index 75b907bf613cb2cc6f6f5bc5d20097b720636882..5afed282a656db50ca3fb6f3fd3eb607f51d6c00 100644 --- a/composer.json +++ b/composer.json @@ -52,6 +52,7 @@ "zendframework/zend-session": "2.7.3", "zendframework/zend-soap": "2.6.0", "zendframework/zend-stdlib": "2.7.7", + "zendframework/zend-text": "2.6.0", "zendframework/zend-validator": "2.8.2", "zendframework/zend-view": "2.8.1", "zendframework/zendrest": "2.0.2", diff --git a/module/VuFindConsole/Module.php b/module/VuFindConsole/Module.php index 43442287f61c185524df7f45b657bc66a9de3d4b..25daa33b94d9ddc168f015b13f7504673d851d9c 100644 --- a/module/VuFindConsole/Module.php +++ b/module/VuFindConsole/Module.php @@ -37,7 +37,8 @@ use Zend\Console\Adapter\AdapterInterface as Console; * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License * @link https://vufind.org/wiki/development */ -class Module implements \Zend\ModuleManager\Feature\ConsoleUsageProviderInterface +class Module implements \Zend\ModuleManager\Feature\ConsoleUsageProviderInterface, + \Zend\ModuleManager\Feature\ConsoleBannerProviderInterface { /** * Get module configuration @@ -65,6 +66,24 @@ class Module implements \Zend\ModuleManager\Feature\ConsoleUsageProviderInterfac ]; } + /** + * Returns a string containing a banner text, that describes the module and/or + * the application. + * The banner is shown in the console window, when the user supplies invalid + * command-line parameters or invokes the application with no parameters. + * + * The method is called with active Zend\Console\Adapter\AdapterInterface that + * can be used to directly access Console and send output. + * + * @param Console $console Console adapter + * + * @return string|null + */ + public function getConsoleBanner(Console $console) + { + return 'VuFind'; + } + /** * Return usage information *