PHP code example of zalatov / yii2-viewfile
1. Go to this page and download the library: Download zalatov/yii2-viewfile library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zalatov / yii2-viewfile example snippets
declare(strict_types=1);
namespace site\views;
use yii\helpers\Html;
use zalatov\viewfile\ViewFile;
/**
* Главная страница.
*
* @property-read SiteController $controller Контроллер
*
* @author Zalatov Alexander <[email protected]>
*/
class Index_ViewFile extends ViewFile {
/**
* @param string $url Какая-то ссылка
* @param int $count Какое-то количество
*
* @author Zalatov Alexander <[email protected]>
*/
public function __construct(string $url, int $count) {
$this->renderer = function() use ($url, $count) {