Download the PHP package quellabs/canvas-twig without Composer

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

Twig Template Engine for Canvas Framework

A Twig template engine implementation for the Canvas PHP framework that provides a consistent interface for template rendering operations.

Features

Installation

Install the package via Composer:

The package includes Twig as a dependency and automatically copies the configuration file to /config/twig.php. No additional setup is required - just register the service provider in your Canvas framework configuration.

Configuration

The package automatically creates a configuration file at config/twig.php during installation.

Selecting the Default Template Engine

To use Twig as the default template engine across your application, set the following in config/app.php:

Once set, rendering templates in your controllers works as normal:

If you need to mix multiple template engines in the same project, you can request a specific engine explicitly via the container:

Error Handling

The template engine provides detailed error messages for common issues:

Performance Considerations

  1. Enable Caching: Always enable caching in production environments
  2. Template Compilation: Twig compiles templates to PHP for better performance
  3. Auto-reload: Disable auto_reload in production to avoid file system checks
  4. Cache Warming: Consider pre-compiling templates for optimal performance

Debugging

Enable debug mode during development:

Use the debug function in templates:

Requirements

License

MIT License

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Add tests for new functionality
  4. Submit a pull request

Support

For issues specific to this Twig implementation, please check:

  1. Twig documentation: https://twig.symfony.com/doc/
  2. Canvas framework documentation
  3. This implementation's source code comments

All versions of canvas-twig with dependencies

PHP Build Version
Package Version
Requires twig/twig Version ^3.0
quellabs/dependency-injection Version ^1.
quellabs/contracts Version ^1.
quellabs/sculpt Version ^1.
quellabs/support Version ^1.
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 quellabs/canvas-twig contains the following files

Loading the files please wait ...