src/mako/view/ViewFactory.php
public function extend(string $extension, $renderer): ViewFactory
	{
		$this->renderers = [$extension => $renderer] + $this->renderers;

		return $this;
	}
public function extend(string $extension, $renderer): ViewFactory
	{
		$this->renderers = [$extension => $renderer] + $this->renderers;

		return $this;
	}
public function extend ( string $ extension , $ renderer ) : ViewFactory { $ this -> renderers = [ $ extension => $ renderer ] + $ this -> renderers ; return $ this ; }
Registers a custom view renderer.

@param  string                 $extension Extension handled by the renderer
@param  string|\Closure        $renderer  Renderer class or closure that creates a renderer instance
@return \mako\view\ViewFactory
Registers a custom view renderer .