Skip to content

Releases: thephpleague/plates

3.0.0

27 Sep 23:59
Compare
Choose a tag to compare
  • Added ability to share data across templates.
  • Added ability to preassign data to specific templates.
  • Added ability to create one-off template functions, without using an extension.
  • Added new folder "fall backs", where missing folder templates will fall back to the default folder.
  • Added new render() method to Engine class, improving the use of the Engine as the primary API.
  • Templates variables are now accessed without the $this pseudo-variable.
  • Total overhaul to how extensions are registered. Replaced getFunctions() method with new register() method.
  • Section content is no longer assigned to template variables. Use the the section() function instead.
  • Renamed section end() function to stop(). This fits more appropriately with the start() function.
  • Renamed get() function to fetch().
  • Renamed pathExists() method in the Engine class to exists().
  • Renamed getTemplatePath() method in the Engine class to path().
  • Renamed makeTemplate() method in the Engine class to make().
  • Removed the ability to assign template data directly to the Template class. For example: $this->name = 'Jonathan'. This applies both within and outside of templates. Use the data() method instead.
  • Removed getEngine() method from the Template class. There's no reason to need this anymore.
  • Removed addFolders() method from the Engine() class.
  • Removed unloadExtension() and unloadExtensionFunction() methods from the Engine() class.

2.1.0

02 Apr 19:45
Compare
Choose a tag to compare
  • Improved DocBlocks throughout the library.
  • The insert() functionality has been moved to a new extension, called Nest.
  • A new get() function was also added with this extension, which offers an alternative syntax for nesting templates.
  • Improved error messages.
  • A new error check which prevents the calling of the render() function from within templates themselves. If this functionally is required, use the nesting functions instead.
  • Added a clearer error message to the content() function when calling it from a non layout template.
  • Added a clearer error message to the batch() extension function when a provided function does not exist.
  • Fixed a bug in the engine where it was possible to overwrite a default extension when loading extensions.

2.0.0

31 Mar 18:02
Compare
Choose a tag to compare
  • Added stacked layouts, allowing even further simplification and organization of templates.
  • Added new unloadExtension() and unloadExtensionFunction() methods to the Engine() class.
  • Added getEngine() method to the Template class.
  • Added addFolders() and loadExtensions() methods to the Engine() class.
  • Nested templates are now self-contained objects, with their own variables and layouts.

1.2.1

20 Feb 16:20
Compare
Choose a tag to compare
  • Added new makeTemplate() template factory method.
  • Added a new pathExists() method to check if a template exists.

1.1.0

31 Jan 23:45
Compare
Choose a tag to compare
  • Switched to PSR-4 autoloading.

1.0.11

20 Feb 16:23
Compare
Choose a tag to compare
  • Updated to reflect new GitHub username (changed from php-loep to thephpleague).

1.0.10

20 Feb 16:23
Compare
Choose a tag to compare
  • Fix bug in the batch extension.

1.0.9

20 Feb 16:23
Compare
Choose a tag to compare
  • Added the ability to assign template variables using the insert() method.

1.0.8

20 Feb 16:23
Compare
Choose a tag to compare
  • Added "replace" value to Composer configuration.