Giter Site home page Giter Site logo

simonbowen / kohana-twig Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexgisby/kohana-twig

1.0 2.0 0.0 227 KB

A Kohana 3.x module for integrating Twig - Me (Alex) has added x-platform (Ko 3.0.x, 3.1.x and 3.2.x) support all in one module

kohana-twig's Introduction

Twig Module

From twig-project.org

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 templating 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.

Credit goes to Jonathan Geiger, John Heathco and Mathew Davies for creating the original modules. This fork contains the following improvements:

  • X-Version: This Twig module works across all 3.x strains of Kohana (3.0.x, 3.1.x, 3.2.x)
  • Updated Twig, currently running 1.1.2

I (Alex) will try and keep this module up to date with Twig and Kohana. If you find a bug let me know!

Installation

  1. git submodule add https://[email protected]/ThePixelDeveloper/kohana-twig.git modules/twig
  2. cd modules/twig && git submodule update --init
  3. Enable twig in your bootstrap.php file
  4. Extend Controller_Template_Twig

Usage

Pretty similar to using the Controller_Template class.

class Controller_Example extends Controller_Template_Twig
{
  // Template names are generated automatically if not specified. So this
  // action would map to: example/index.html
  public function action_index()
  {
    $this->template->variable = "Hello World";
  }
}

Not Happy?

Either file a bug report or try an alternative project:

kohana-twig's People

Contributors

alexgisby avatar bistory avatar icyleaf avatar jheathco avatar jturmel avatar mastercj avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.