Plates Versions Save

Native PHP template system

3.0.0

9 years ago
  • 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

10 years ago
  • 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

10 years ago
  • 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.0.8

10 years ago
  • Added "replace" value to Composer configuration.

1.0.9

10 years ago
  • Added the ability to assign template variables using the insert() method.

1.0.10

10 years ago
  • Fix bug in the batch extension.

1.0.11

10 years ago
  • Updated to reflect new GitHub username (changed from php-loep to thephpleague).

1.2.1

10 years ago
  • Added new makeTemplate() template factory method.
  • Added a new pathExists() method to check if a template exists.

1.1.0

10 years ago
  • Switched to PSR-4 autoloading.