public function getTemplate($domain, $name)
    {
        if (!isset($this->templates[$domain][$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Template with name "%s" in domain "%s" has not been registered',
                $name,
                $domain
            ));
        }

        return $this->templates[$domain][$name];
    }
public function getTemplate($domain, $name)
    {
        if (!isset($this->templates[$domain][$name])) {
            throw new \InvalidArgumentException(sprintf(
                'Template with name "%s" in domain "%s" has not been registered',
                $name,
                $domain
            ));
        }

        return $this->templates[$domain][$name];
    }
public function getTemplate ( $ domain , $ name ) { if ( ! isset ( $ this -> templates [ $ domain ] [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'Template with name "%s" in domain "%s" has not been registered' , $ name , $ domain ) ) ; } return $ this -> templates [ $ domain ] [ $ name ] ; }
Retrieves a template by domain and name.

@param string $domain Domain of the template
@param string $name   Name of the template

@throws \InvalidArgumentException

@return TemplateInterface
Retrieves a template by domain and name .