public function get($domain, $key = null)
    {
        $this->validateDomain($domain);

        if (null === $key) {
            return new Config($this->profile[$domain]);
        }

        if (!isset($this->profile[$domain][$key])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown key "%s" for profile domain "%s"',
                $key, $domain
            ));
        }

        return $this->profile[$domain][$key];
    }
public function get($domain, $key = null)
    {
        $this->validateDomain($domain);

        if (null === $key) {
            return new Config($this->profile[$domain]);
        }

        if (!isset($this->profile[$domain][$key])) {
            throw new \InvalidArgumentException(sprintf(
                'Unknown key "%s" for profile domain "%s"',
                $key, $domain
            ));
        }

        return $this->profile[$domain][$key];
    }
public function get ( $ domain , $ key = null ) { $ this -> validateDomain ( $ domain ) ; if ( null === $ key ) { return new Config ( $ this -> profile [ $ domain ] ) ; } if ( ! isset ( $ this -> profile [ $ domain ] [ $ key ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Unknown key "%s" for profile domain "%s"' , $ key , $ domain ) ) ; } return $ this -> profile [ $ domain ] [ $ key ] ; }
Get a domain configuration.

@param string $domain
@param string $key

@throws \InvalidArgumentException

@return array
Get a domain configuration .