Skip to content

Commit

Permalink
feat: add console banner
Browse files Browse the repository at this point in the history
  • Loading branch information
TiSiE committed Sep 23, 2020
1 parent 84f18aa commit e7afea3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Core\ModuleManager\Feature\VersionProviderTrait;
use Core\ModuleManager\ModuleConfigLoader;
use Laminas\Console\Adapter\AdapterInterface;
use Laminas\ModuleManager\Feature\ConsoleBannerProviderInterface;
use Laminas\ModuleManager\Feature\ConsoleUsageProviderInterface;

/**
Expand All @@ -23,7 +24,10 @@
* @since 0.26
* @package Solr
*/
class Module implements ConsoleUsageProviderInterface, VersionProviderInterface
class Module implements
ConsoleUsageProviderInterface,
ConsoleBannerProviderInterface,
VersionProviderInterface
{
use VersionProviderTrait;

Expand All @@ -47,6 +51,11 @@ public function getConsoleUsage(AdapterInterface $console)
];
}

public function getConsoleBanner(AdapterInterface $console)
{
return sprintf("%s (%s) %s", __NAMESPACE__, $this->getName(), $this->getVersion());
}

/**
* Loads module specific configuration.
*
Expand Down

0 comments on commit e7afea3

Please sign in to comment.