View 1.0.0
2021-07-05
904次浏览
First version of View package is released. This library provides templates rendering abstraction supporting layout-view-subview hierarchy, custom renderers with PHP-based as default and more. It is used in Yii Framework 3 but is supposed to be usable separately.
PHP templates look like the following:
<?php
declare(strict_types=1);
/**
* @var Yiisoft\View\View $this
* @var App\Blog\Post[] $posts
*/
?>
Posts:
<?php foreach ($posts as $post): ?>
Title: <?= $post->getTitle() . "\n" ?>
Description: <?= $post->getDescription() . "\n\n"?>
<?php endforeach ?>
The view package is divided into two parts:
- General purpose view suitable for any template rendering such as emails, SMS messages etc.
- Web-specific views supporting HTML-specific functionality.
As usual, the package has 100% tests coverag and close to 100% type coverage and mutation score.
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- view
- auth client
- bootstrap
- html
- release
- apidoc
- redis
- Yii 2.0
- mongodb
- Yii 1.1
- extensions
- mailer
- gii
- console
- http 客户端
- runner
- validation
- twig
- queue
- cache
- translator
- hydrator
- widget
- http
- sphinx
- error handler
- db
- config
- log
- symfonymailer
- router
- elasticsearch
- swagger
- assets
- swiftmailer
- 图书
- imagine
- csrf
- IDE
- i18n
- definitions
- rbac
- user
- smarty
- logging