|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61985 - website/public_html/beta/common/code
From: daniel_james_at_[hidden]
Date: 2010-05-15 06:48:13
Author: danieljames
Date: 2010-05-15 06:48:12 EDT (Sat, 15 May 2010)
New Revision: 61985
URL: http://svn.boost.org/trac/boost/changeset/61985
Log:
Remove the extractor_instance_ member of boost_archive.
Text files modified:
website/public_html/beta/common/code/boost_archive.php | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 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:48:12 EDT (Sat, 15 May 2010)
@@ -89,10 +89,7 @@
return;
}
- $extractor_name = $extractor.'_filter';
-
$archive = new boost_archive();
- $archive->extractor_instance_ = new $extractor_name;
$archive->key_ = $archive_location_details['key'];
// Note: this sets $archive->content_ with either the content or an error
@@ -106,22 +103,24 @@
$archive->content_ = call_user_func($preprocess, $archive->content_);
}
- $archive->extractor_instance_->render($archive);
+ $extractor_name = $extractor.'_filter';
+ $extractor_instance = new $extractor_name;
+ $extractor_instance->render($archive);
}
class boost_archive
{
var $key_ = NULL;
- var $extractor_instance_ = NULL;
var $title_ = NULL;
var $charset_ = NULL;
var $content_ = NULL;
}
class boost_archive_render_callbacks {
- var $archive;
+ var $extractor, $archive;
- function boost_archive_render_callbacks($archive) {
+ function boost_archive_render_callbacks($extractor, $archive) {
+ $this->extractor = $extractor;
$this->archive = $archive;
}
@@ -138,9 +137,9 @@
function content()
{
- if ($this->archive->extractor_instance_)
+ if ($this->extractor)
{
- $this->archive->extractor_instance_->content($this->archive);
+ $this->extractor->content($this->archive);
}
}
}
@@ -190,7 +189,7 @@
function render($archive) {
$archive->title_ = htmlentities($archive->key_);
- display_template(new boost_archive_render_callbacks($archive));
+ display_template(new boost_archive_render_callbacks($this, $archive));
}
}
@@ -218,7 +217,7 @@
function render($archive) {
$archive->title_ = htmlentities($archive->key_);
- display_template(new boost_archive_render_callbacks($archive));
+ display_template(new boost_archive_render_callbacks($this, $archive));
}
}
@@ -269,7 +268,7 @@
function render($archive) {
$this->html_init($archive);
- display_template(new boost_archive_render_callbacks($archive));
+ display_template(new boost_archive_render_callbacks($this, $archive));
}
}
@@ -290,7 +289,7 @@
$text = prepare_themed_html($text);
$archive->content_ = $text;
- display_template(new boost_archive_render_callbacks($archive));
+ display_template(new boost_archive_render_callbacks($this, $archive));
}
else {
print $archive->content_;
@@ -324,7 +323,7 @@
function render($archive) {
$this->html_init($archive);
- display_template(new boost_archive_render_callbacks($archive));
+ display_template(new boost_archive_render_callbacks($this, $archive));
}
}
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