Download the PHP package pine3ree/pine3ree-plates-resolvers without Composer

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

pine3ree-plates-resolvers

This package provides a couple of template resolvers with cache support for the Plates engine:

Install

This package requires PHP 7.4 ~ 8.2. You can install it via composer:

NameAndFolderResolveTemplatePath

Works the same way as the default Plates template-path resolver, but with added cache support for resolved templates.

The internal cache stores and returns by name those template paths that have already been positively resolved, thus avoiding calling $name->getPath() repeatedly on the same template. The internal cache is enabled including the CacheableResolveTemplatePathTrait trait in this package implementing methods of the CacheableResolveTemplatePathInterface

This is useful in cases when you use partials like sorting-table-headers links or multiple paginators several times on the same page. At the same time it also provides long term caching for async environments like Swoole

ReverseFallbackResolveTemplatePath

This resolver acts in the opposite way of the default plates resolver

When a template is rendered with a folder specification (Plates :: notation), the search starts at the default template directory (if defined) but with an added sub-folder matching the folder specification, e.g.:

Furthermore, when a template name is provided without a folder specification but contains the path separator "/", then a folder will be assigned using the first segment. Therefore the previous example applies also for the following simpler render call:

In both cases the "partial" folder must have been defined in the engine's configuration.

This can be useful in modular application, where we want each module templates to be close to the source code. In those cases we set a folder for each module template. When we reuse the same module in other applications it will works right away. Then, we will use the default "application" templates directory t0 customize/override the default templates provided by each module.

Example:

Given the following application directory structure

The following code applies:

The url-path "/" segment notation is recommended since it shows the template path relative to the global templates directory, while the standard folder notation could trick into believeing that global directory templates are not being used.


All versions of pine3ree-plates-resolvers with dependencies

PHP Build Version
Package Version
Requires league/plates Version ^3.5
php Version ^7.4 || ^8.0 || ^8.1 || ^8.2
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 pine3ree/pine3ree-plates-resolvers contains the following files

Loading the files please wait ....