public function getBuildFlavor()
    {
        $appConfig = $this->getConfig();
        if (!isset($appConfig['type'])) {
            throw new InvalidConfigException('Application configuration key not found: `type`');
        }

        $key = isset($appConfig['build']['flavor']) ? $appConfig['build']['flavor'] : 'default';
        list($stack, ) = explode(':', $appConfig['type'], 2);
        foreach (self::getBuildFlavors() as $candidate) {
            if (in_array($key, $candidate->getKeys())
                && ($candidate->getStacks() === [] || in_array($stack, $candidate->getStacks()))) {
                return $candidate;
            }
        }
        throw new InvalidConfigException('Build flavor not found: ' . $key);
    }
public function getBuildFlavor()
    {
        $appConfig = $this->getConfig();
        if (!isset($appConfig['type'])) {
            throw new InvalidConfigException('Application configuration key not found: `type`');
        }

        $key = isset($appConfig['build']['flavor']) ? $appConfig['build']['flavor'] : 'default';
        list($stack, ) = explode(':', $appConfig['type'], 2);
        foreach (self::getBuildFlavors() as $candidate) {
            if (in_array($key, $candidate->getKeys())
                && ($candidate->getStacks() === [] || in_array($stack, $candidate->getStacks()))) {
                return $candidate;
            }
        }
        throw new InvalidConfigException('Build flavor not found: ' . $key);
    }
public function getBuildFlavor ( ) { $ appConfig = $ this -> getConfig ( ) ; if ( ! isset ( $ appConfig [ 'type' ] ) ) { throw new InvalidConfigException ( 'Application configuration key not found: `type`' ) ; } $ key = isset ( $ appConfig [ 'build' ] [ 'flavor' ] ) ? $ appConfig [ 'build' ] [ 'flavor' ] : 'default' ; list ( $ stack , ) = explode ( ':' , $ appConfig [ 'type' ] , 2 ) ; foreach ( self :: getBuildFlavors ( ) as $ candidate ) { if ( in_array ( $ key , $ candidate -> getKeys ( ) ) && ( $ candidate -> getStacks ( ) === [ ] || in_array ( $ stack , $ candidate -> getStacks ( ) ) ) ) { return $ candidate ; } } throw new InvalidConfigException ( 'Build flavor not found: ' . $ key ) ; }
Get the build flavor for the application.

@throws InvalidConfigException If a build flavor is not found.

@return BuildFlavorInterface
Get the build flavor for the application .