Download the PHP package jensostertag/templify without Composer

On this page you can find all versions of the php package jensostertag/templify. 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 templify

Templify for PHP

Templify is a simple templating engine for PHP. It uses default PHP syntax but handles the logic of displaying, including and fetching the HTML code of template files which makes it very adaptable for any project.

Installation

To install Templify, include it in your project using composer:

Usage

Setting the template base directory Before you can use Templify, you have to specify the base directory where your template files are located. This is done by calling In this example, your template files would have to be located in the `📁 templates/` directory relative to the file where you're setting the base directory. You can also use absolute paths.
Display a template To display a template (`template.php`) without binding any variables, call This will display the template file `template.php` that has to be located in the template base directory you've set earlier. To have a better overview over your file structure, you can also organize your template files in subdirectories and prepend the path to the template file name. To display a template and bind variables to it, you have to define the variables in an associative array with the keys as variable names and the values as corresponding values: Then, pass the array to the `display()` method: In the template file, you can use them just like any other variable in PHP: Of course, you can define the variable array in the same line as you're passing it to the `display()` method, this is just for better readability.
Including other templates inside a template file If you're developing a website where there is a lot of reused code, you can use Templify to include other template files inside a template file. This is done by calling This will include the template file `template.php` from the `📁 includes/` directory that has to be located in the template base directory you've set earlier (let's say it was `📁 templates/`, the above code would include the `📄 templates/includes/template.php` template file). To have a better overview over your file structure, you can also organize your template files in subdirectories and prepend the path to the template file name. Just like with the `display()` method, you can also bind variables to the included template file:
Fetching the HTML code of a template Templify can also be used to fetch the HTML code of a template file instead of displaying it. This is done by calling and comes in handy if you want to send an email with a template as the body.

All versions of templify with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0.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 jensostertag/templify contains the following files

Loading the files please wait ....