Download the PHP package jbboehr/php-mustache without Composer

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

php-mustache

GitHub Build Status Coverage Status AI burn

C++ implementation of Mustache as a PHP extension.

Upgrading from 0.9.x? Read the migration guide before updating.

Installation

PIE

PIE requires PHP 8.1 or newer to run, but it can install the extension for PHP 8.0:

For releases with matching binary assets, PIE downloads the extension with libmustache linked statically. These packages target Windows x64 with PHP 8.0–8.5 and macOS 15 or newer on Apple Silicon with PHP 8.2–8.5, in both thread-safe and non-thread-safe modes. Check the release assets for availability.

On Windows, PIE requires a matching binary; it cannot compile the extension. Other Windows architectures and PHP builds are unsupported by these packages.

On Unix systems, including macOS, PIE builds from source when no matching binary is available. Install the source requirements, including libmustache 0.6.0 or newer. For source builds with libmustache under a non-standard prefix, pass it explicitly. This option selects a source build on Unix even when a matching binary is available:

Source

Requirements:

If libmustache is installed under a non-standard prefix, pass --with-libmustache=/path/to/prefix to configure.

Add the extension to php.ini:

Nix

Use the flake package to build a PHP environment with the extension enabled:

The default package uses PHP 8.3. Replace default with a matrix package such as php85-gcc to select another PHP version.

Windows

PIE installation requires a matching DLL ZIP in the selected release; it cannot fall back to compiling on Windows. The binary includes libmustache, so no separate libmustache installation is needed.

For source builds, install the PHP SDK and matching Visual C++ toolset. Download a static libmustache SDK matching PHP's architecture and toolset, and pass its extracted directory as --with-libmustache=C:\path\to\libmustache. Use v142 for PHP 8.0–8.3 and v143 for PHP 8.4–8.5. Both TS and NTS builds use the SDK's /MD runtime variant.

Usage

Example:

Produces:

See the official Mustache manual for template syntax, the PHP API guide for data conversion, lambdas, errors, and limits, and the template loader example for loading templates from files.

MustacheData and MustacheLambdaHelper are final classes and cannot be subclassed. To add application behavior around converted data, store a MustacheData instance in your own class and pass the stored MustacheData instance to Mustache::render(). The extension supplies MustacheLambdaHelper to section lambdas; use the helper only during its callback.

PHP also rejects ReflectionClass::newInstanceWithoutConstructor() for these two classes.

Mustache, MustacheTemplate, and MustacheAST remain extensible. The PHP stub describes their public methods and types.

License

The MIT License (MIT). Please see License File for more information.


All versions of php-mustache with dependencies

PHP Build Version
Package Version
Requires php Version >=8.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 jbboehr/php-mustache contains the following files

Loading the files please wait ...