# monei/7.1.3/src/Templates/TemplateManager.php

MONEI Payments for WooCommerce, version 7.1.3. 29 lines.

- Page: https://pluginprobe.com/plugins/monei/7.1.3/code/src/Templates/TemplateManager.php
- Raw: https://pluginprobe.com/plugins/monei/7.1.3/raw/src/Templates/TemplateManager.php
- Modified: 2025-02-18T16:56:22+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/monei/7.1.3/code/src/Templates/TemplateManager.php#L10-L20`.

```php
<?php

namespace Monei\Templates;

class TemplateManager {

	/**
	 * @var TemplateInterface[]
	 */
	private array $templates = array();

	/**
	 * @param TemplateInterface[] $templates Keyed array of templateName => TemplateInstance
	 */
	public function __construct( array $templates ) {
		$this->templates = $templates;
	}

	/**
	 * Retrieve the template instance by name.
	 *
	 * @param string $templateName
	 * @return TemplateInterface|null
	 */
	public function getTemplate( string $templateName ): ?TemplateInterface {
		return $this->templates[ $templateName ] ?? null;
	}
}

```
