Download the PHP package maplephp/swiftrender without Composer

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

SwiftRender

PHP SwiftRender is a pure PHP advanced template library. It offers several advantages for developers who need to create and render templates in PHP applications. Firstly, it can improve performance, as there is no need for an additional language or engine to process the template. This can result in faster rendering times and reduced overhead. Additionally, a pure PHP template library is highly portable, as it can be used in almost any PHP application, regardless of the underlying platform or framework.

PHP SwiftRender offers greater flexibility and control over the rendering process. Developers that knows PHP can structure and design their templates in ways that better suit their specific needs, resulting in more efficient and effective templates.

PHP is a widely-used language, most developers are already familiar with its syntax and conventions. This makes it easier to learn and use a pure PHP template library than an entirely new templating language or engine.

Usage

Initialisation

One time setup to use through the application.

Templating

Index

The file /resources/index.php has already been bounded under the initialisation section above $swift->setIndex("index"). The file looks like this:

View

The file /resources/views/main.php has already been bounded under the initialisation section above $swift->setView("main"). The file looks like this:

Partial

The file /resources/partials/article.php has already been bounded under the initialisation section above $swift->setPartial("article", ...). The file looks like this:

Partial functionality

The partials all arguments will automatically be converted to an object with a lot of extended functionality. Here is some:

Run the template engine

You can run the template engine later in an empty file, emitter or router dispatcher. It all depends on your setup.

Dynamic views

You can also create a dynamic view that will overwrite the current view if called. This is great for e.g. showing a 404 page.

In this example the current view which is /resources/views/main will be replaced with the view /resources/views/httpStatus.php when response status code is (403, 404 e.g.).

Easy DOM manipulation

Advance DOM creation and works great with stuff like the Metadata because you can later in change values and attributes in the controller.


All versions of swiftrender with dependencies

PHP Build Version
Package Version
Requires php Version >=8.0
maplephp/dto Version ^2.0
maplephp/container Version ^1.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 maplephp/swiftrender contains the following files

Loading the files please wait ....