PHPackages                             redbird/vlib-template5 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. redbird/vlib-template5

ActiveLibrary[Templating &amp; Views](/categories/templating)

redbird/vlib-template5
======================

Updated legacy tempating engine vLibTemplate package for use in PHP8+

v5.0.10(8mo ago)0185Artistic-2.0PHPPHP &gt;=8.0

Since Jul 21Pushed 8mo agoCompare

[ Source](https://github.com/edgarsstrods/vLibTemplate5)[ Packagist](https://packagist.org/packages/redbird/vlib-template5)[ Docs](https://github.com/edgarsstrods/vLibTemplate5)[ Fund](https://www.buymeacoffee.com/edgarsstrods)[ RSS](/packages/redbird-vlib-template5/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)DependenciesVersions (11)Used By (0)

vLibTemplate 5 for php8
=======================

[](#vlibtemplate-5-for-php8)

This package aims to extend life for legacy PHP projects still using vLibTemplate library and wanting to use it with [Composer](https://getcomposer.com)

Original library
----------------

[](#original-library)

Library is originally created by: Kelvin Jones, Stefan Deußen and Claus van Beek

Official Website is [http://vlib.clausvb.de/index.php/Main\_Page](http://vlib.clausvb.de/index.php/Main_Page)The official site is not working correctly anymore.

Original library download link: [SourceForge](https://sourceforge.net/projects/vlib/)

Copy of documentation for original library: [https://acdh-oeaw.github.io/vLIB/docs/vlib.clausvb.de/docs/vlibTemplate\_english/table\_of\_content.html](https://acdh-oeaw.github.io/vLIB/docs/vlib.clausvb.de/docs/vlibTemplate_english/table_of_content.html)

The purpose
-----------

[](#the-purpose)

The original package was created 20+ years ago and refers in code to PHP4&amp;5 that is very outdated now. Many projects still run perfectly fine using this library, but migrating to latest PHP might be problematic, so this modified new version could help this transfer. The last original library version was 4.2.1 this project uses version 5.0.0 as starting point.

The aim of this package:

- Modify the original classes as little as possible, to keep maximum compatibility with existing code
- Remove any functions marked as deprecated for latest stable PHP version
- Make it PHP8.4+ compatible
- Add types, modernize code syntax.
- Publish in Packagist for easy install
- Try to minimise the implementation/configuration work
- Countinue to keep package compatible in next PHP versions
- All includes moved to autoload
- Reduce clutter and package size, removing outdated parts (see next)

This package implements (at least for now) only these parts:

- vLibTemplate
- vLibTemplateCache
- vLibInit

Other parts as vlibDate, Swift, vlibMimeMail, vlibSearchToSQL, etc. are **NOT** included! I doubt they will ever be (I do no need them :) ) and for email it is better to implement modern alternatives. But if someone finds useful to add some of these parts - welcome to contribute!

Original, **but modified** classes are put under namespace "Original". If you can not use Composer, but need PHP8 compatibility - you can try to hack with "includes" this folders source in your existing project. This is reason the class names are not changed, but put under namespace.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
  composer require redbird/vlib-template5
```

### Example codes

[](#example-codes)

### Bare minimum without vlibIni (not recomended) or only for single-page aplications.

[](#bare-minimum-without-vlibini-not-recomended-or-only-for-single-page-aplications)

```
