class PPDStack {
var $stack, $rootAccum, $top;
var $out;
+ var $elementClass = 'PPDStackElement';
+
static $false = false;
function __construct() {
}
function push( $data ) {
- if ( $data instanceof PPDStackElement ) {
+ if ( $data instanceof $this->elementClass ) {
$this->stack[] = $data;
} else {
- $this->stack[] = new PPDStackElement( $data );
+ $class = $this->elementClass;
+ $this->stack[] = new $class( $data );
}
$this->top = $this->stack[ count( $this->stack ) - 1 ];
$this->accum =& $this->top->getAccum();
$parts, // Array of PPDPart objects describing pipe-separated parts.
$lineStart; // True if the open char appeared at the start of the input line. Not set for headings.
+ var $partClass = 'PPDPart';
+
function __construct( $data = array() ) {
- $this->parts = array( new PPDPart );
+ $class = $this->partClass;
+ $this->parts = array( new $class );
foreach ( $data as $name => $value ) {
$this->$name = $value;
}
function addPart( $s = '' ) {
- $this->parts[] = new PPDPart( $s );
+ $class = $this->partClass;
+ $this->parts[] = new $class( $s );
}
function getCurrentPart() {
}
/**
- * An expansion frame, used as a context to expand the result of preprocessToDom()
+ * An expansion frame, used as a context to expand the result of preprocessToObj()
*/
class PPFrame_DOM implements PPFrame {
var $preprocessor, $parser, $title;