Download the PHP package coolms/dtmpl-bundle without Composer

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

coolms/dtmpl-bundle

CI Latest Version PHP

Symfony integration for coolms/dtmpl. Registers the engine, assembles the loader chain, collects widgets and constant providers.

The engine is a separate package on purpose: it runs without an HTTP kernel or a DI container, and keeping this bundle out of it is what preserves that. If you are not on Symfony, install coolms/dtmpl alone and wire it yourself.

Installation

Configuration

Key Purpose
template_base_path root the filesystem loader resolves against
extensions logical name to file extension map
widget_templates which partial each widget renders through

widget_templates is the seam that keeps widget markup out of PHP: a theme repoints a widget at a different partial without touching the renderer.

What gets registered

Service Notes
DtmplEngine public; the entry point
CompositeTemplateLoader aliased to TemplateLoaderInterface
FilesystemTemplateLoader wired with template_base_path
WidgetRegistry populated by the widget pass
WidgetTemplateResolver aliased to its interface
Lexer, Parser, FilterRegistry, ... the engine's internals

Extension points

Implement an interface; the bundle tags it.

Interface Tag Effect
WidgetRendererInterface dtmpl.widget adds {widget:yourKey}
TemplateLoaderInterface dtmpl.template_loader joins the loader chain
ConstantProviderInterface coolms.dtmpl.constant_provider adds {const:YOURS}

Loaders sort by getPriority() descending, with FallbackTemplateLoader pinned last. To fix a priority for your own loader class, call registerForAutoconfiguration on the concrete class in your bundle's build().

A note on the compiler passes

The loader chain, the widget registry and the constant providers are wired by compiler passes rather than by extension arguments. That is not stylistic: an application whose App\ glob re-registers a service would silently discard arguments an extension had set, because the glob loads after bundle extensions. A pass runs once every definition exists, so the wiring survives.

License

MIT © Dmitry Popov


All versions of dtmpl-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
coolms/dtmpl Version ^2.1
symfony/config Version ^8.0
symfony/dependency-injection Version ^8.0
symfony/http-kernel 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 coolms/dtmpl-bundle contains the following files

Loading the files please wait ...