Download the PHP package milpa/template without Composer

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

Milpa

# Milpa Template > Framework-agnostic template rendering for the Milpa PHP framework — [Latte](https://latte.nette.org/) > behind an interface small enough to replace. [![CI](https://github.com/getmilpa/template/actions/workflows/ci.yml/badge.svg)](https://github.com/getmilpa/template/actions/workflows/ci.yml) [![Packagist](https://img.shields.io/packagist/v/milpa/template.svg)](https://packagist.org/packages/milpa/template) [![PHP](https://img.shields.io/badge/php-%E2%89%A5%208.3-777bb4.svg)](https://www.php.net/) [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE) Two methods — point at a directory, render a file with variables. Everything else the package does exists to solve one problem: **a plugin's view has to be able to extend a layout the host owns, without either of them copying files to the other's side.** ## Install ## Usage ## The one idea `MultiDirFileLoader` resolves a template against **its own directory first, and the shared one second**. That order is the whole rule: - a plugin ships `views/mail/receipt.latte` and it wins for that plugin; - the same plugin writes `{extends 'layouts/base.latte'}` and gets the **host's** layout, because it is not in the plugin's own directory; - the host overrides a plugin view by placing a file with the same name in its own directory — no registration, no config, no editing the plugin. Reversed, a host could not customize anything without editing the package it installed. ## What it deliberately does not do **No globals, no `rootPath`.** Paths arrive through the constructor. A renderer that reads a global constant works in exactly one application and fails silently in tests, which is where you find out. **No `echo`.** `render()` returns the string. A renderer that writes to output forces every caller to capture buffers and makes the result impossible to compose into another response. **No template functions or filters of its own.** The Latte engine is exposed as it is; conveniences belong to whoever knows the domain. ## Replacing Latte `TemplateEngineInterface` is two methods. If you want Twig, or plain PHP, or something you wrote yourself, implement those two and pass it to `Template` — nothing else in the package knows Latte exists. That is the reason the interface is there and the reason it stayed small. ## Requirements PHP ≥ 8.3 · [latte/latte](https://latte.nette.org/) ^3.0 · [PSR-3](https://www.php-fig.org/psr/psr-3/) for optional logging. ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md). Security reports go through [SECURITY.md](SECURITY.md) — privately, via GitHub Security Advisories. ## License [Apache-2.0](LICENSE) © Rodrigo Vicente - TeamX Agency. --- Milpa is designed, built, and maintained by **[Rodrigo Vicente - TeamX Agency](https://teamx.agency/?utm_source=github&utm_medium=readme&utm_campaign=milpa&utm_content=template)**.

All versions of template with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3
latte/latte Version >=3.0,<3.1
psr/log Version ^3.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 milpa/template contains the following files

Loading the files please wait ...