Bug->Req #12813 [Asn]: Make setOption() useful, or provide accessors
| From: | daniel dot oconnor at gmail dot com | Date: | Mon, 21 Sep 2009 00:44:23 +0000 |
| Subject: | Bug->Req #12813 [Asn]: Make setOption() useful, or provide accessors | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-1682@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=12813&edit=1
ID: 12813
Updated by: daniel.oconnor@gmail.com
Reported By: obw at amarok dot ping dot de
Summary: Make setOption() useful, or provide accessors
Status: Assigned
-Type: Bug
+Type: Feature/Change Request
Package: HTML_Template_IT
Operating System: all
Package Version: 1.2.1
PHP Version: 5.2.5
Assigned To: thorstenr
Roadmap Versions:
New Comment:
-Type: Bug
+Type: Feature/Change Request
Previous Comments:
------------------------------------------------------------------------
[2009-09-21 01:44:12] doconnor
-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 01:40:04] doconnor
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.
------------------------------------------------------------------------
[2008-11-17 15:39:03] cweiske
The options should be settable via setOption() instead/additionally to
accessing the public properties. Will that be fixed?
------------------------------------------------------------------------
[2008-01-02 19:13:01] obw
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;
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=12813&edit=1