Download the PHP package devpontes/view without Composer
On this page you can find all versions of the php package devpontes/view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package view
View by @Devpontes
About View componet
View is a simple component for rendering templates with native PHP.
View é um componente simples para renderização de templates com PHP nativo.
Highlights
- Renderização simples de templates. (simple rendering of templates)
- Controle dinâmico de ativos de JS e CSS. (dynamic Control of JS and CSS Assets)
- Controle dinâmico do template HTML. (dynamic control of the HTML template)
Installation
View is available via Composer:
or run
Documentation
To use View you need to define the path to the views folder.
- Para utilizar o View você precisa definir o caminho para a pasta de views.
At initialization, we need to pass the path to the views folder and the extension to the template file type as an argument.
- Na inicialização precisamos passar como argumento o caminho para a pasta de views e a extensão para o tipo de arquivo de templates.
Use modifier methods to dynamically include parts of the template. Then, use the render method passing an array of data and the selected view. You can use either the slash (/) or the period (.) as a directory separator. For more details, see the example folder in the component directory.
- Use os métodos modificadores para incluir dinamicamente partes do template. Em seguida, utilize o método render passando um array de dados e a view selecionada. Você pode usar tanto a barra (/), quanto o ponto(.), como separador de diretórios. Para mais detalhes, veja a pasta de exemplo no diretório do componente.
Basic usage
In the template
Use the insert method to insert a component directly into the template
Call addAssets by injecting an Assets object to manipulate JS and CSS assets through the makeScript and makeStyle methods. You can omit addAssets if the assets are inserted in the template itself, see
- Chame addAssets injetando um objeto de Assets para manipular os ativos de JS e CSS através dos métodos makeScript e makeStyle. Você pode omitir o addAssets caso os ativos sejam inseridos no próprio template, veja:
Add assets
The default path for styles and scripts folders (css and js). Use modifier methods to change the pattern
- O caminho padrão para pastas de estilos e scripts (css e js). Use métodos modificadores para alterar o padrão.
Add CSS in <head>
Add JS in <body>
Credits
- Moises Pontes (Developer)
License
The MIT License (MIT).
All versions of view with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
The package devpontes/view contains the following files
Loading the files please wait ....