Download the PHP package codelake/template-flow without Composer

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

TemplateFlow

TemplateFlow is a simple and extendable templating engine with a focus on E-Mail and HTML templating. Therefore, TemplateFlow may not work as expected if you want to output plain text which contains HTML special characters like . It provides an easy way to define and placeholders in a template and process them via pipes.

Template

In TemplateFlow a simple template can be defined as follows . Rendering that template with the desired data can be achieved as follows:

Pipes

Replacing placeholders with values is already nice to have but not really powerful. Therefore, TemplateFlow provides pipes. Pipes allow you to specify how a given placeholder value should be mutated before it is displayed. TemplateFlow already comes with a lot of predefined pipes. A complete list of the predefined pipes can be found at Predefined Pipes

There are also parameterized pipes - like shorten - which take a parameter. A parameter may be passed to a pipe in parenthesis.

Some pipes also require more than one parameter. To distinct multiple parameters, the pipe operator (|) is used.

Adding Pipes

Pipes are just functions in a . Therefore, if you want to add your own pipes to TemplateFlow, you just have to create a new with the desired pipes as static methods on it.

It is recommended to use snake_case with lower case characters only, to guarantee easy to read pipes and prevent errors due to typos.

NOTE Since PHP is case insensitive in regard to function names, the use of camelCase and PascalCase are discouraged.

NOTE TemplateFlow will always try to execute discovered pipes (methods) in a static context. So, declaring a pipe as a normal method will lead to an exception.

Removing Pipes

In case you want to unregister/remove pipes, you can easily unregister the corresponding class. This will prevent TemplateFlow from creating new s with the class' methods. Existing s will still work as they already loaded the methods.

Predefined Pipes

In order to use predefined pipes, you first have to add it to the engine.

capitalize

Mutates the first character of a string to upper case.

link

Creates a link (anchor tag) with the specified address.

usage - for web links
usage - for mailto links

lower

Transforms all characters in a string to lower case.

raw

Returns a RawOutput instance, so the pipeline result will not be escaped.
NOTE This pipe has to be the last one in the chain. Otherwise the output will be escaped as usual.

shorten

Cuts off the remaining characters of the pipeline string after the n-th character.

trim

Removes all whitespace characters from the left and right side of a string.

trim_left

Removes all whitespace characters from the left side of a string.

trim_right

Removes all whitespace characters from the right side of a string.

upper

Transforms all characters in a string to upper case.


All versions of template-flow with dependencies

PHP Build Version
Package Version
Requires league/pipeline 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 codelake/template-flow contains the following files

Loading the files please wait ....