]> Raphaël G. Git Repositories - blogbundle/commitdiff
Rename rapsys_blog bundle alias to rapsysblog
authorRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 09:28:22 +0000 (11:28 +0200)
committerRaphaël Gertz <git@rapsys.eu>
Tue, 14 Oct 2025 09:28:22 +0000 (11:28 +0200)
Add version

RapsysBlogBundle.php

index 2e19b5010b158e2e368e1a9708fe993691c5f9d8..bea72239516a4b17cf6916eac5f2c1cbac2fabe8 100644 (file)
 
 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';
+       }
 }