Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.3.1

Request #12813 Make setOption() useful, or provide accessors
Submitted: 2008-01-03 00:13 UTC
From: obw Assigned: gregorycu
Status: Assigned Package: HTML_Template_IT (version 1.2.1)
PHP Version: 5.2.5 OS: all
Roadmaps: (Not assigned)    
Subscription  


 [2008-01-03 00:13 UTC] obw (Oliver B. Warzecha)
Description: ------------ setOption() does not work as advertised in the documentation. In fact, all options given in the docs must be accessed as public properties of the object instead. setOption() supports only two options not documented, which can be seen in lines 354 ff. of IT.php, named preserve_data and use_preg. Test script: --------------- $tpl= new HTML_Template_IT(); // throws error and does not work tpl->setOption('removeEmptyBlocks', false); // instead use: $tpl->removeEmptyBlocks = false;

Comments

 [2008-11-17 20:39 UTC] cweiske (Christian Weiske)
The options should be settable via setOption() instead/additionally to accessing the public properties. Will that be fixed?
 [2009-09-21 05:40 UTC] doconnor (Daniel O'Connor)
http://pear.php.net/manual/en/package.html.html-template-it.setoption.php says: "Note: Currently setOption allows to set only two options. Instead of using this method, access the properties directly on the template object. " Which is kind of stupid, but makes this bug invalid as described.
 [2009-09-21 05:44 UTC] doconnor (Daniel O'Connor)
-Summary: setOption() does work contrary to documentation +Summary: Make setOption() useful, or provide accessors
setOption() is kind of pointless. Implement decent setters / getters instead.
 [2009-09-21 05:44 UTC] doconnor (Daniel O'Connor)
-Type: Bug +Type: Feature/Change Request
 [2010-03-03 04:53 UTC] gregorycu (Gregory Currie)
-Assigned To: thorstenr +Assigned To: gregorycu