You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduction of New 'Template' Class
A new file, 'Template.php', was introduced. This file defines a 'Template' class, a useful tool for rendering a view. It takes in a path, parameters, a view instance, and an optional view context instance then holds them for easy access. Moreover, this class comes with getter methods to fetch this information back.
Changes in 'TemplateRendererInterface' Interface
The render method signature within the 'TemplateRendererInterface' interface has been updated to accept a newly defined 'Template' object instead of individual parameters. This streamlines the method's usage by requiring only one object argument rather than a series of parameters.
Changes in 'PhpTemplateRenderer' Class
Similarly, changes have been made in the 'PhpTemplateRenderer' class. The render method signature now accepts a 'Template' object, providing a consolidated and standardized way for the method to draw data. It uses the getter methods from the 'Template' object to acquire its necessary parameters.
Removal of 'render' Method from 'ViewTrait'
The 'render' method from the 'ViewTrait' has been removed. Instead, its function was replaced by the render method of the renderer, utilizing a 'Template' object for its parameters.
Introduction of 'TemplateTest.php' File
A new testing file, 'TemplateTest.php' is added to ensure the functionality of the newly added 'Template' class. The file aims to assess and validate the reliability and effectiveness of this class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.