Download the PHP package merophp/php-template-view without Composer
On this page you can find all versions of the php package merophp/php-template-view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download merophp/php-template-view
More information about merophp/php-template-view
Files in merophp/php-template-view
Download merophp/php-template-view
More information about merophp/php-template-view
Files in merophp/php-template-view
Vendor merophp
Package php-template-view
Short Description PHP template view plugin for merophp/view-engine
License MIT
Package php-template-view
Short Description PHP template view plugin for merophp/view-engine
License MIT
Please rate this library. Is it a good library?
Informations about the package php-template-view
DRAFT
Introduction
PHP template view plugin for merophp/view-engine.
(!) Be aware of security problems if you don't escape your variables in templates.
Installation
Via composer:
composer require merophp/php-template-view
Basic Usage
require_once 'vendor/autoload.php';
use Merophp\PhpTemplateViewPlugin\PhpTemplateView;
use Merophp\ViewEngine\ViewEngine;
use Merophp\ViewEngine\ViewPlugin\Collection\ViewPluginCollection;
use Merophp\ViewEngine\ViewPlugin\Provider\ViewPluginProvider;
use Merophp\ViewEngine\ViewPlugin\ViewPlugin;
use Merophp\ViewEngine\TemplateArgument\Argument;
use Merophp\ViewEngine\TemplateArgument\SharedArgument;
$collection = new ViewPluginCollection();
$collection->add(
new ViewPlugin(PhpTemplateView::class),
]);
$provider = new ViewPluginProvider($collection);
$viewEngine = new ViewEngine($provider);
$view = $viewEngine->initializeView();
$view->assignTemplateArguments(
new Argument('name', 'Tom'),
new SharedArgument('name', 'Tom') //This argument is available in the template and all of its partials
);
$view->template('viewPackage.hello');
echo $viewEngine->renderView($view);
All versions of php-template-view with dependencies
PHP Build Version
Package Version
The package merophp/php-template-view contains the following files
Loading the files please wait ....