src/Collection/Templates.php
public function findTemplate(string $index): Template
    {
        $template = $this->getByIndex($index);

        if ($template instanceof Template) {
            return $template;
        }

        // Oops, template not found
        throw TemplateNotFoundException::create($index);
    }
public function findTemplate(string $index): Template
    {
        $template = $this->getByIndex($index);

        if ($template instanceof Template) {
            return $template;
        }

        // Oops, template not found
        throw TemplateNotFoundException::create($index);
    }
public function findTemplate ( string $ index ) : Template { $ template = $ this -> getByIndex ( $ index ) ; if ( $ template instanceof Template ) { return $ template ; } // Oops, template not found throw TemplateNotFoundException :: create ( $ index ) ; }
Finds and returns template with given index

@param string $index Index that contains required template
@throws TemplateNotFoundException
@return Template
Finds and returns template with given index