X-Git-Url: https://git.rapsys.eu/packbundle/blobdiff_plain/013e3b68170a39d007a29ef45ea0eb222fbcb2d8..d8a52aa745826b3dfa93f3e800a63ea57453d6e5:/RapsysPackBundle.php 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 *