public function canRender($template) { $extension = pathinfo($template, PATHINFO_EXTENSION); if (!$extension) { foreach ($this->getExtensions() as $extension) { if ($this->canRender($template . '.' . $extension)) { return true; } } return false; } return in_array(strtolower($extension), $this->extensions) && $this->fileLoader->exists($template); }