PHP Classes
elePHPant
Icontem

Notable PHP package: Mask

Recommend this page to a friend!
  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)  

Author: Manuel Lemos

Posted on:

Categories: Notable Packages

Template engines are frequently used in PHP applications to generate Web pages or some kind of other output from template files or strings, as they make it easy to separate login from presentation code.

Usually you use a component that processes a template file or a string and replaces some variables with values passed to the template engine.

This package provides an alternative approach by using a trait that can be used by any class. The template variables are replaced by the values of class variables or return values of class functions with the same names.

This way developers can easily turn templates into classes of their own that they can call to generate their applications output.

Read this article to learn more details about how this notable PHP package works.




The package Mask is one of the few PHP packages that was considered notable recently because it does something that is worth paying attention.

The basic purpose is: Trait to process templates with class functions

Here follows in more detail what it does:

This class provides a trait to process templates with class functions.

It can be included on a class to process templates and use the class function call return values or variable values to replace in the template.

The template engine can compile the templates into PHP scripts and cache them to avoid further processing. It also supports:

1. Conditional sections
2. Foreach iteration loop sections
3. Include external templates

Notable PHP packages can be often considered innovative. If this package is also innovative, it can be nominated to the PHP Innovation Award and the author may win prizes and recognition for sharing innovative packages.

If you also developed your own notable or innovative packages consider sharing them, so you can also earn more visibility for your package.



You need to be a registered user or login to post a comment

1,412,582 PHP developers registered to the PHP Classes site.
Be One of Us!

Login Immediately with your account on:

FacebookGmail
HotmailStackOverflow
GitHubYahoo


Comments:

No comments were submitted yet.



  Blog PHP Classes blog   RSS 1.0 feed RSS 2.0 feed   Blog Notable PHP package: ...   Post a comment Post a comment   See comments See comments (0)   Trackbacks (0)