namesco / ZTal

ZTal makes integrating the PHP templating system PHPTAL into Zend Framework easy.
Other
21 stars 3 forks source link

View should allow for Zend_Filter_inflector overrides #9

Closed niterain closed 13 years ago

niterain commented 13 years ago

I understand it is a standard for ZTal to use camel casing for its view files to set it apart from Zend Frameworks naming convention. However, view frameworks should allow overrides to its naming convention using Zend_Filter_inflector.

// With the constructor:
$config    = new Zend_Config($options);
$inflector = new Zend_Filter_Inflector($config);

// Or with setOptions():
$inflector = new Zend_Filter_Inflector();
$inflector->setOptions($config);
far-blue commented 13 years ago

Changing the naming format for templates in Ztal will not be supported via configuration options because including the functionality increases complexity and reduces clarity both when writing documentation and supporting the codebase. I believe the same reasons are used by ZF in not allowing the configuration of ZF template filenames. However, in the latest dev commit I have split the routine that converts the template name out from the render method and into its own protected method so anyone who really wants or needs to can now easily subclass the View class and override the method. I hope this is an acceptable option for you :)