Download the PHP package rnr1721/le7-view without Composer
On this page you can find all versions of the php package rnr1721/le7-view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package le7-view
le7-view
Base View component for le7 framework or any PHP projects.
You can install any of this in any PHP 8 PSR project.
Requirements
- PHP 8.1 or higher.
- Composer 2.0 or higher.
What it can?
- AssetsCollection object for manage collections of JS and CSS
- WebPage object for store webpage header and scripts data
- ViewTrait that part of any view adapter for le7-framework
Installation
This component is dependency for this projects:
- https://github.com/rnr1721/le7-view-twig - Twig renderer
- https://github.com/rnr1721/le7-view-smarty - Smarty renderer
- https://github.com/rnr1721/le7-view-php - PHP renderer
You must install one of them to use it, but...
Testing
AssetsCollection
This is great tool to manage assets collection. It can be controlled by special setter methods or you can set configuration array into constructor.
Example of configuration:
NOTE: Now you can use "variables" in CDN: URLs for local places: {url}, {libs}, {js}, {css} example: {url}/libs/jquery.js
Now, we can create instance of AssetsCollectionGeneric (implements AssetsCollectionInterface):
Methods for setting scripts
setStyle
You can set new style to styles library:
setScript
You can set new scripts to styles library:
setCollection
You can set new collection to styles library: For example, we need collection, where will be vuejs JS and bootstrap5 CSS: Of course, all scripts with keys need to be defined before.
WebPage object
WebPage object collects various information about web page and you can use in in webpage template - scripts, styles, meta-tags, import maps, title, description, keywords etc.
ViewTopology object
ViewTopology needs to store base paths and urls.
All versions of le7-view with dependencies
psr/http-message Version ^2.0
psr/simple-cache Version ^3.0
psr/event-dispatcher Version ^1.0