X-Git-Url: https://git.rapsys.eu/blogbundle/blobdiff_plain/54bb2da9da0dbb5f5946ce3c13639921443c30aa..d3028f63781ff2767401e31e36ee1c99e6fc484b:/RapsysBlogBundle.php diff --git a/RapsysBlogBundle.php b/RapsysBlogBundle.php index 2e19b50..bea7223 100644 --- a/RapsysBlogBundle.php +++ b/RapsysBlogBundle.php @@ -11,16 +11,24 @@ namespace Rapsys\BlogBundle; -use Symfony\Component\DependencyInjection\Container; +use Symfony\Component\DependencyInjection\Extension\ExtensionInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; class RapsysBlogBundle extends Bundle { + /** + * {@inheritdoc} + */ + public function getContainerExtension(): ?ExtensionInterface { + //Return created container extension + return $this->createContainerExtension(); + } + /** * Return bundle alias * * @return string The bundle alias */ - public static function getAlias(): string { + public static function getAlias(): string { //With namespace if ($npos = strrpos(static::class, '\\')) { //Set name pos @@ -40,7 +48,17 @@ class RapsysBlogBundle extends Bundle { $bpos = strlen(static::class) - $npos; } - //Return underscored lowercase bundle alias - return Container::underscore(substr(static::class, $npos, $bpos)); - } + //Return lowercase bundle alias + return strtolower(substr(static::class, $npos, $bpos)); + } + + /** + * Return bundle version + * + * @return string The bundle version + */ + public static function getVersion(): string { + //Return version + return '0.0.1'; + } }