Re: phpdoc2peardoc
| From: | (Alexander Merz) | Date: | Wed, 11 Sep 2002 00:00:35 +0000 |
| Subject: | Re: phpdoc2peardoc | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9008@lists.php.net to get a copy of this message | ||
Pierre-Alain Joye wrote:
I use in the script a global variable called "$subst", which includes every string to assign to a template placeholder: (paste fro pd2pm) foreach($parameters as $parameter) { $subst['parametertype'] = $parameter['type']; $subst['parametername'] = $parameter['name']; $subst['parameterdesc'] = strip_tags($parameter['value']); $tpl->setCurrentBlock('PARAMETERENTRY'); $tpl->setVariable( $subst ); $tpl->parseCurrentBlock('PARAMETERENTRY'); } unset($subst['parametertype']); unset($subst['parametername']); unset($subst['parameterdesc']); $tpl->setCurrentBlock('PARAMETER'); $tpl->setVariable($subst); $tpl->parseCurrentBlock('PARAMETER'); If you do not unset the named $subst entries the parsing of the 'Parameter' block creates a new parsed 'paramentry' block. If $parameters contains 2 array you get 3 'PARAMENTRY'-blocks Normaly i would expected: - parse and substitute 'PARAMENTRY' - parse and substitute 'PARAMETER' -> include the processed 'PARAMETERENTRY' blocks and only substitude place holders in 'PARAMETER' *outside* 'PARAMETERENTRY'5.) edit pd2pm.php to meet your paths for HTML_Template_IT and PHPDoc 6.) comment the IT.php and ITX.php includes in prepend.php of PHPDocBtw, did you encounter any kind of problem with it ? If no, I release it as stable right now. I would call it "mysterious" or unexpected behavoir