Skip to content

Added getTemplates function to MemoryLoader#660

Merged
ebussieres merged 2 commits into
PebbleTemplates:masterfrom
eflogic:feature/add-getTemplates
Nov 27, 2023
Merged

Added getTemplates function to MemoryLoader#660
ebussieres merged 2 commits into
PebbleTemplates:masterfrom
eflogic:feature/add-getTemplates

Conversation

@eflogic

@eflogic eflogic commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Summary
This Pull Request adds a new method getTemplates() to the MemoryLoader class. The method is designed to return a list of all the existing templates currently loaded in memory.

Background
In applications that dynamically generate or update Pebble templates, it is often necessary to get a list of all existing templates. However, the MemoryLoader class lacks a method for obtaining this information, which could lead to inefficiencies and limitations in application development.

Changes
Added a new method getTemplates() in MemoryLoader class.
Updated relevant unit tests (if applicable).

Use Case
This feature will be useful in scenarios where developers need to:

Debug or log currently loaded templates.
Implement functionality that depends on the list of loaded templates.

Allen added 2 commits September 30, 2023 02:53
Making the inner class TemplateDefinition public to allow external access for specific use-cases.
@ebussieres ebussieres added this to the 3.2.2 milestone Nov 27, 2023
@ebussieres ebussieres merged commit c5fa796 into PebbleTemplates:master Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants