private function get_templates($directory) {
		$templates = [];
		foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($directory), \RecursiveIteratorIterator::LEAVES_ONLY) as $file)
		{
		    if ($file->isFile() === false) {
		        continue;
		    }

			if ($file->getExtension() != 'twig' && $file->getExtension() != 'tpl') {
				continue;
			}

		    $resource = str_replace($directory, '', $file);
		    $templates[] = $resource;
		}

		return $templates;
	}