Releases: wireframe-framework/Wireframe
Releases · wireframe-framework/Wireframe
0.13.1
Fixed
- Config class getPaths() method had wrong return type specified, rendering module config screen unusable.
0.13.0
Added
- New hook makes View properties directly accessible in TemplateFiles (e.g. when rendering field templates)
Changed
- Wireframe::getController() is now a public method that can return current Controller instance, the Controller instance for provided page, or a Controller instance for provided Page and template name.
- Visibility of following methods was changed from public to protected: Wireframe::___checkRedirects(), Wireframe::___redirect(), Wireframe::___initView(), Wireframe::___initController(), \Wireframe\Config::getCreateDirectoriesField().
- Controller class implementation was streamlined: new objects are wired using the native wire() function, and thus Controller constructors no longer require the ProcessWire instance as an argument.
- Wireframe no longer caches partials unnecessarily, plus new Partial objects are automatically wired.
- Various minor optimizations, some code cleanup, and a few improvements to comments.
0.12.0
Added
- Support for named arguments when using
Wireframe::component($component_name, $args)
. - JSON API. See comments in the WireframeAPI module file for more details.
- New Page methods Page::getController() and Page::setController().
- Module config screen provides support for creating directories corresponding to configured Wireframe URLs, assuming that they were provided as relative paths.
Changed
- Wireframe::setView() accepts optional view name as an argument.
- View::setController() accepts Controller name (string) in addition to Controller class instance or null.
- When Controller is instantiated, it no longer overrides the Controller property of the related View instance.
Fixed
- Factory::partial() now works as expected for partial names with file ext included (partial_name.php etc.)
- Factory::partial() prevents 2 or more dots in partial name, just in case (directory traversal is not intended).
0.11.0
Changed
- Partials class now detects if a missing partial is being requested and throws an exception.
0.10.2
Fixed
- When rendering a partial with arguments, prepare the arguments array properly before use.
0.10.1
Fixed
- Autoload Factory class in cases where it's methods are called before Wireframe has been initiated.
0.10.0
Added
- New class Partials. Container for Partial objects. Provides a gateway for rendering partials with arguments (
$partials->name(['arg' => 'val'])
). - New class Partial. Singular Partial object. Provides the ability to render a partial and adds support for multiple (alternate) file extensions for each partial.
- New class Factory. This class encapsulates various static factory methods and is accessed through the Wireframe class.
- New static method Wireframe::partial($partial_name, $args). This method provides a shortcut for rendering partial files.
- New method Wireframe::setViewTemplate(). This allows overriding current view template via the Wireframe object, primarily intended to be used in the Wireframe bootstrap file.
Changed
- Shared renderer related features were moved to new trait RendererTrait. This is used internally by View, Component, and Partial classes.
0.9.1
Fixed
- An issue where rendering a Page that didn't have an existing template file or altFilename via Wireframe::page() could result in ProcessWire error message.
0.9.0
Added
- New EventListenerTrait. Currently used by Components only. Adds support for listening to and emitting events.
- Support for Renderer modules for adding templating engine support for view files, component view files, etc.
- New Page methods Page::viewTemplate(), Page::getViewTemplate(), and Page::setViewTemplate().
- New method Component::getData() for manually defining the data passed to the component view.
Changed
- Controller::init() and Controller::ready() are now hookable methods.
- Component::setView() and Component::getView() are now final methods, preventing accidental overrides.
- Layout file is no longer necessary; if it's missing, the page can be rendered using just a view file.
0.8.0
Added
- Support for Components, along with a new static factory method Wireframe::component($component_name, $args).
- Support for rendering pages that have not been "routed" to Wireframe using the altFilename template setting.
- New static getter/factory/utility method Wireframe::page($source, $args).
- New static utility method Wireframe::isInitialized().
Changed
- Wireframe::$initialized is now a static property. This was a necessary change so that Wireframe::isInitialized() could be implemented effectively.