public function getAlias()
    {
        $className = get_class($this);
        if (substr($className, -6) != 'Config') {
            throw new \BadMethodCallException('This Config class does not follow the naming convention; you must overwrite the getAlias() method.');
        }
        $classBaseName = substr(strrchr($className, '\\'), 1, -6);

        return strtolower($classBaseName);
    }
public function getAlias()
    {
        $className = get_class($this);
        if (substr($className, -6) != 'Config') {
            throw new \BadMethodCallException('This Config class does not follow the naming convention; you must overwrite the getAlias() method.');
        }
        $classBaseName = substr(strrchr($className, '\\'), 1, -6);

        return strtolower($classBaseName);
    }
public function getAlias ( ) { $ className = get_class ( $ this ) ; if ( substr ( $ className , - 6 ) != 'Config' ) { throw new \ BadMethodCallException ( 'This Config class does not follow the naming convention; you must overwrite the getAlias() method.' ) ; } $ classBaseName = substr ( strrchr ( $ className , '\\' ) , 1 , - 6 ) ; return strtolower ( $ classBaseName ) ; }
Returns the mandatory prefix to use when using YAML.

This convention is to remove the "Config" postfix from the class
name and then lowercase and underscore the result. So:

AcmeHelloConfig

becomes

acme_hello

This can be overridden in a sub-class to specify the alias manually.

@throws \BadMethodCallException When the extension name does not follow conventions

@return string The alias
Returns the mandatory prefix to use when using YAML .