|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61981 - website/public_html/beta/common/code
From: daniel_james_at_[hidden]
Date: 2010-05-15 06:46:50
Author: danieljames
Date: 2010-05-15 06:46:50 EDT (Sat, 15 May 2010)
New Revision: 61981
URL: http://svn.boost.org/trac/boost/changeset/61981
Log:
Combine the init and render stages.
This means that preprocess is called before what was init, but I think
that's okay.
Text files modified:
website/public_html/beta/common/code/boost_archive.php | 57 +++++++--------------------------------
1 files changed, 10 insertions(+), 47 deletions(-)
Modified: website/public_html/beta/common/code/boost_archive.php
==============================================================================
--- website/public_html/beta/common/code/boost_archive.php (original)
+++ website/public_html/beta/common/code/boost_archive.php 2010-05-15 06:46:50 EDT (Sat, 15 May 2010)
@@ -120,7 +120,6 @@
file_not_found($this->file_, $this->content_);
return;
}
- $this->extractor_instance_->init($this);
if ($this->preprocess_) {
$this->content_ = call_user_func($this->preprocess_, $this->content_);
@@ -191,11 +190,6 @@
class text_filter
{
- function init($archive)
- {
- $archive->title_ = htmlentities($archive->key_);
- }
-
function content($archive)
{
print "<h3>".htmlentities($archive->key_)."</h3>\n";
@@ -205,17 +199,14 @@
}
function render($archive) {
+ $archive->title_ = htmlentities($archive->key_);
+
display_template(new boost_archive_render_callbacks($archive));
}
}
class cpp_filter
{
- function init($archive)
- {
- $archive->title_ = htmlentities($archive->key_);
- }
-
function content($archive)
{
$text = htmlentities($archive->content_);
@@ -236,13 +227,15 @@
}
function render($archive) {
+ $archive->title_ = htmlentities($archive->key_);
+
display_template(new boost_archive_render_callbacks($archive));
}
}
class html_base_filter
{
- function init($archive)
+ function html_init($archive)
{
preg_match('@text/html; charset=([^\s"\']+)@i',$archive->content_,$charset);
if (isset($charset[1]))
@@ -260,11 +253,6 @@
class boost_book_html_filter extends html_base_filter
{
- function init($archive)
- {
- parent::init($archive);
- }
-
function content($archive)
{
$text = prepare_html($archive->content_);
@@ -291,17 +279,13 @@
}
function render($archive) {
+ $this->html_init($archive);
display_template(new boost_archive_render_callbacks($archive));
}
}
class boost_libs_filter extends html_base_filter
{
- function init($archive)
- {
- parent::init($archive);
- }
-
function content($archive)
{
return $archive->content_;
@@ -309,6 +293,7 @@
function render($archive)
{
+ $this->html_init($archive);
$text = extract_html_body($archive->content_);
if($text) {
$text = prepare_html($text);
@@ -326,11 +311,6 @@
class boost_frame1_filter extends html_base_filter
{
- function init($archive)
- {
- parent::init($archive);
- }
-
function content($archive)
{
$text = prepare_html($archive->content_);
@@ -354,34 +334,22 @@
}
function render($archive) {
+ $this->html_init($archive);
display_template(new boost_archive_render_callbacks($archive));
}
}
class simple_filter extends html_base_filter
{
- function init($archive)
- {
- }
-
- function content($archive)
- {
- print prepare_html($archive->content_);
- }
-
function render($archive)
{
- $this->content($archive);
+ print prepare_html($archive->content_);
}
}
class basic_filter extends html_base_filter
{
- function init($archive)
- {
- }
-
- function content($archive)
+ function render($archive)
{
$text = prepare_html($archive->content_);
$text = remove_html_banner($text);
@@ -419,11 +387,6 @@
}
}
}
-
- function render($archive)
- {
- $this->content($archive);
- }
}
/* File Not Found */
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk