fuel / parser

Fuel PHP Framework - v1.x template parser package adapters
http://fuelphp.com
64 stars 45 forks source link

Develop #2

Closed billmn closed 13 years ago

billmn commented 13 years ago

Added Twig configurations and driver improvements :

jschreuder commented 13 years ago

Why does the Twig dir have to be uppercase first char? You create the dir & copy in those files yourself don't you? I don't see a good reason to break our conventions before we're actually in the lib.

Also I'd prefer it if you kept the static properties/methods on top and the dynamic (non-static) below, but I can change that back myself.

On the whole: great job, thanks for contributing!

billmn commented 13 years ago

With lowercase "lib_name" ( also with your twig driver ) I obtain :

"Class 'Twig_Loader_String' not found"

I think there are some problems with Twig interfaces ... if you use "Twig" all works fine. In Twig's documentation ( http://www.twig-project.org/doc/intro.html ) the lib name always appear with first char uppercased.

I can move dynamic properties below. I had to move Twig_Load_Filesystem on "capture" function because needs view name

jschreuder commented 13 years ago

You're right about the Twig autoloader, it demands its basedir to be named "Twig", it moves one dir up when the classname starts with "Twig_" and then includes "Twig/" into the expected dir - thus disallowing renaming the dir it's in.

Other than my notes in the code it's ready for merging.

billmn commented 13 years ago

I have commited changes ... take a look

jschreuder commented 13 years ago

Great, thanks!