X-Git-Url: https://git.rapsys.eu/packbundle/blobdiff_plain/4cbd6aeb6b995561ff19c41f000d29c177ef4a58..20503eaf77166c0b638beb84ee6d0a0be8e95113:/RapsysPackBundle.php?ds=sidebyside diff --git a/RapsysPackBundle.php b/RapsysPackBundle.php index 285c7bb..c9a6d48 100644 --- a/RapsysPackBundle.php +++ b/RapsysPackBundle.php @@ -28,45 +28,6 @@ class RapsysPackBundle extends Bundle { return $this->createContainerExtension(); } - /** - * Return bundle alias - * - * @return string The bundle alias - */ - public static function getBundleAlias(): string { - //With namespace - if ($npos = strrpos(static::class, '\\')) { - //Set name pos - $npos++; - - //With single namespace - $nspos = strpos(static::class, '\\'); - //Without namespace - } else { - //Set name pos - $npos = 0; - } - - //With trailing bundle - if (substr(static::class, -strlen('Bundle'), strlen('Bundle')) === 'Bundle') { - //Set bundle pos - $bpos = strlen(static::class) - $npos - strlen('Bundle'); - //Without bundle - } else { - //Set bundle pos - $bpos = strlen(static::class) - $npos; - } - - //With namespace - if ($npos) { - //Return prefixed class name - return strtolower(substr(static::class, 0, $nspos).'/'.substr(static::class, $npos, $bpos)); - } - - //Return class name - return strtolower(substr(static::class, $npos, $bpos)); - } - /** * Return alias *