Plates v3.0.0 Release Notes
Release Date: 2014-09-27 // over 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 toEngine
class, improving the use of theEngine
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 newregister()
method. - Section content is no longer assigned to template variables. Use the the
section()
function instead. - 📇 Renamed section
end()
function tostop()
. This fits more appropriately with thestart()
function. - 📇 Renamed
get()
function tofetch()
. - 📇 Renamed
pathExists()
method in theEngine
class toexists()
. - 📇 Renamed
getTemplatePath()
method in theEngine
class topath()
. - 📇 Renamed
makeTemplate()
method in theEngine
class tomake()
. - ✂ 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 thedata()
method instead. - ✂ Removed
getEngine()
method from theTemplate
class. There's no reason to need this anymore. - ✂ Removed
addFolders()
method from theEngine()
class. - ✂ Removed
unloadExtension()
andunloadExtensionFunction()
methods from theEngine()
class.