3 namespace Rapsys\UserBundle
;
5 use Symfony\Component\DependencyInjection\Container
;
6 use Symfony\Component\HttpKernel\Bundle\Bundle
;
8 class RapsysUserBundle
extends Bundle
{
12 * @return string The bundle alias
14 public static function getAlias(): string {
16 if ($npos = strrpos(static::class, '\\')) {
24 //With trailing bundle
25 if (substr(static::class, -strlen('Bundle'), strlen('Bundle')) === 'Bundle') {
27 $bpos = strlen(static::class) - $npos - strlen('Bundle');
31 $bpos = strlen(static::class) - $npos;
34 //Return underscored lowercase bundle alias
35 return Container
::underscore(substr(static::class, $npos, $bpos));