Download the PHP package titpetric/minitpl without Composer

On this page you can find all versions of the php package titpetric/minitpl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package minitpl

MiniTPL

The goal of the MiniTPL template engine is to provide a miniature framework which allows you to rapidly create and consume Smarty-like templates without adding the overhead of Smarty to your choice of a PHP framework.

In benchmarks the speed of Mini TPL is very close to PHP itself. All that is usually needed for Mini TPL is a 3KB PHP code overhead. So it beats Smarty, and usual PHP vsprintf and str_replace functionality.

With a total size of about 13KB and the functionality contained, this is one of the smallest full featured template engines for PHP to date.

MiniTPL is available on packagist as titpetric/minitpl.

To start using MiniTPL in your project with composer:

You can start using MiniTPL right away.

The classes live in the MiniTPL namespace: MiniTPL\Template, MiniTPL\Compiler and MiniTPL\Hook. Compiler and Hook are usable stand-alone; Template is the entrypoint you normally want.

Escaping

Printed variables are escaped by default. The compiler scans the template to see where a variable lands, so {title} is escaped in a text node, in an attribute value and in a comment, and left alone inside a <script> or <style> body where html escaping would corrupt the code:

A value that is already markup opts out per tag with {content|raw}, or its {content|unescape} alias. A whole template opts out with the {*noescape*} directive, and a whole Template instance with $tpl->set_escape(false).

This changes compiled output, so a cache written by an earlier version has to be cleared once on upgrade. See docs/minitpl-usage.md for the full rules.

phpscript

The engine is kept compatible with phpscript, a PHP interpreter written in Go. phpscript resolves composer.json and the vendor/ directory on its own, so the same vendor/autoload.php include works there:

Testing

The project tries to maintain 100% code coverage. You can verify this by running phpunit --coverage-text, or uncommenting the logging section within phpunit.xml.


All versions of minitpl with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package titpetric/minitpl contains the following files

Loading the files please wait ...