Giter Club home page Giter Club logo

fuel-parser's Introduction

Parser package

Installing

Simply add parser to your config.php always_loaded.packages config option.

Included Parsers

  • Mustache - A lightweight, yet powerful templating library.
  • SimpleTags - A library released by Dan Horrigan for basic template tag usage.

Usage

// old usage still valid, will load app/views/example.php
View::forge('example');

// load a SimpleTags template, will load and parse app/views/example.stags
View::forge('example.stags');

// load a Mustache template, will load and parse app/views/example.mustache
View::forge('example.mustache');

// load a Twig template, will load and parse app/views/example.twig
View::forge('example.twig');

// load a Jade template, will load and parse app/views/example.jade
View::forge('example.jade');

// load a Haml template, will load and parse app/views/example.haml
View::forge('example.haml');

// load a Smarty template, will load and parse app/views/example.smarty
View::forge('example.smarty');

// load a Dwoo template, ATTENTION: this one expects app/views/example.tpl
View::forge('example.dwoo');

Installing parsers

Only SimpleTags and Mustache are included. While many other drivers are included, their libraries are not and are by default expected in app/vendor/lib_name (capitalize lib_name), you'll have to download them yourself. Don't change the casing or anything, keep it as much original as possible within the vendor/lib_name dir to keep updating easy (also because some come with their own autoloader).

You can configure them to be loaded from other locations by copying the parser.php config file to your app and editing it.

Config and runtime config

Currently the drivers still lack a lot of config options they should probably accept. They are currently all configured to work with one instance of their parser library, which is available to config:

$view = View::forge('example.stags');
$view->parser()->set_delimiters('{', '}');

fuel-parser's People

Contributors

dhrrgn avatar billmn avatar evantishuk avatar rickharris avatar wanwizard avatar ounziw avatar frankdejonge avatar phpwebnet avatar adammbalogh avatar iquito avatar

Watchers

kenjis avatar James Cloos 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.