Home - Twig - The flexible, fast, and secure PHP template engine

Web Name: Home - Twig - The flexible, fast, and secure PHP template engine

WebSite: http://twig.sensiolabs.org

ID:109381

Keywords:

flexible,fast,The,twig,templating,template,engine,templateengine,templatelanguag

Description:

Fast: Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum. Secure: Twig has a sandbox mode to evaluate untrusted template code. This allows Twig to be used as a template language for applications where users may modify the template design. Flexible: Twig is powered by a flexible lexer and parser. This allows the developer to define its own custom tags and filters, and create its own DSL. When it comes to template engines in PHP, many people will tell you that PHP itself is a template engine. But even if PHP started its life as a template language, it did not evolve like one in the recent years. As a matter of fact, it doesn't support many features modern template engines should have nowadays: Concise: The PHP language is verbose and becomes ridiculously verbose when it comes to output escaping: In comparison, Twig has a very concise syntax, which make templates more readable: Template oriented syntax: Twig has shortcuts for common patterns, like having a default text displayed when you iterate over an empty array: Full Featured: Twig supports everything you need to build powerful templates with ease: multiple inheritance, blocks, automatic output-escaping, and much more: Easy to learn: The syntax is easy to learn and has been optimized to allow web designers to get their job done fast without getting in their way. Of course, PHP is also the language for which you can find the more template engine projects. But most of them do not embrace web development best practices yet: Extensibility: Twig is flexible enough for all your needs, even the most complex ones. Thanks to an open architecture, you can implement your own language constructs (tags, filters, functions, and even operators) to create your very own DSL. Unit tested: Twig is fully unit-tested. The library is stable and ready to be used in large projects. Documented: Twig is fully documented, with a dedicated online book, and of course a full API documentation. Automatic output escaping: To be on the safe side, you can enable automatic output escaping globally or for a block of code: {{ var|raw }} {# var won t be escaped #} {{ var|escape }} {# var won t be doubled-escaped #}{% endautoescape %} Sandboxing: Twig can evaluate any template in a sandbox environment where the user has access to a limited set of tags, filters, and object methods defined by the developer. Sandboxing can be enabled globally or locally for just some templates: Clean Error Messages: Whenever you have a syntax problem within a template, Twig outputs a helpful message with the filename and the line number where the problem occurred. It eases the debugging a lot. Fast: One of the goals of Twig is to be as fast as possible. To achieve the best speed possible, Twig compiles templates down to plain optimized PHP code. The overhead compared to regular PHP code was reduced to the very minimum. Twig is brought to you by Fabien Potencier, the creator of the Symfony framework. Twig is released under the new BSD license.

TAGS:flexible fast The twig templating template engine templateengine templatelanguag

<<< Thank you for your visit >>>

Twig - The flexible, fast, and secure template engine for PHP

Websites to related :
The Reluctant Networker | 2nd ed

  “Most of my outplacement candidates find the idea of networking deeply depressing but this book makes it seem almost infectiously exciting! I think t

Northern Virginia Regional Commi

  According to the Centers for Disease Control, the 2020–21 influenza season will coincide with the continued or recurrent circulation COVID19. Flu sea

Condor Squadron Home page - The

  The Condor Squadron Officer’s and Airmen’s Association is a unique non-profit organization founded in 1965 by a group of WWII fighter pilots, preser

Phoenix Pharmaceuticals Inc. - W

  You can reset your password now. Please check your e-mail inbox to reset your password. Thank you. To activate your new account, please check your e-m

Welcome To The Prayer Shawl Mini

  Photo By: Shana Sureck - The Hartford Courant August 7, 2002About the Shawls...In 1998, Janet Severi Bristow and Victoria Galo, two graduates of the 1

Massage Training Online & Massag

  Dr. Benjamin is co-author of The Ethics of Touch, author of Listen to Your Pain, and Founder of the Muscular Therapy Institute. He maintains a private

The Reluctant Entrepreneur - Bat

  How is a solopreneur like someone in search of his perfect mate? Well, they are both looking for contacts; they both need to present their best attrib

B3TA : WE LOVE THE WEB

  B3ta newsletter 755,out now:* QUIZ - How decisive are you? * FESSHOLE - Cat nipple doctor shock* BBC MICROS - a surprising amount of them. OK, two Rea

The Down Factory Store offers

  To help you Sleep Well. Sleep Right. We are committed to providing you with the finest down products designed with you in mind. Our fabrics conform to

The National CFIDS Foundation's

  This site is best viewed with JavaScript enabled.If JavaScript is disabled in your browser, please turn it back on then reload this page. Our Goals Th

ads

Hot Websites