Re: PhD - Patch to add support to DBTimestamp processing instructions

From: Date: Wed, 06 Jan 2010 14:40:49 +0000
Subject: Re: PhD - Patch to add support to DBTimestamp processing instructions
References: 1 2 3  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969381253@lists.php.net to get a copy of this message
2010/1/6 Hannes Magnusson <hannes.magnusson@gmail.com> > > Out of curiosity, why does the ::PI section in Render.php not do the > same as all the others? > All other handlers do similar to: > foreach($this as $format) { > $parsed_value = $format->doStuff($with, $value); > if ($parsed_value === false) { > $format->appendData($orginal_value); > } else { > $format->appendData($parsed_value); > } > } > But with PI, you have to manually call $this->format->appendData() > from the PI handler.. it seems wrong. > > The PI section is different because is not possible to know what the PI will do. In case of dbhtml you can modify the file name for chunks, set the directory to write files etc. so it's not just to append data. But is possible to use the structure of the other handlers and just return false when there is no data to append. --Moacir de Oliveira

« previous php.doc (#969381253) next »