PHP output trapping support

From: Date: Sat, 15 May 1999 22:02:15 +0000
Subject: PHP output trapping support
Groups: php.dev 
Request: Send a blank email to php-dev+get-5646@lists.php.net to get a copy of this message
Hello, I wonder if there are any plans to add support to PHP output trapping to Zend/PHP. Output trapping is a way to redefine where PHP output is going. Currently, all output goes either to the standard output or the Web server request socket connection. Output trapping would let programmers tell the output to be processed/filtered by some user defined function. Let me explain what I mean and its importance. Many people develop library code and general purpose classes that generate HTML that is embedded in the presentation of pages, like for instance: query results embedded in table columns and form fields embedded in HTML code that defines how they are layed out. I have developed a PHP class that has been frequently requested that generates forms from a description of the fields. To output the code of the form the programmer that uses my class has to define the layout HTML code within each HTML for the form fields is embedded. Currently, the programmer has to call methods of my class to define how the form fields are interleaved in the HTML layout code. It could be made simpler, if instead of calling a method to define the layout code the prorgrammer could simply escape from PHP code with ?> and just type HTML layout code. If PHP supported output trapping the the programmer could tell PHP that user defined function would process PHP output instead of going straight to the standard output or the Web server request socket connection. This would make possible what I described: letting programmer define HTML layout code escaped from PHP code to be processed by classes or library code. Any comments or intention to implement such kind of support in future versions fo PHP/Zend? Regards, Manuel Lemos -- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#5646) next »