64 $this->parts = [
new $class ];
66 foreach ( $data as $name => $value ) {
67 $this->$name = $value;
72 return $this->parts[count( $this->parts ) - 1]->out;
77 $this->parts[] =
new $class(
$s );
84 return $this->parts[count( $this->parts ) - 1];
91 $partCount = count( $this->parts );
92 $findPipe = $this->open !=
"\n" && $this->open !=
'[';
94 'findPipe' => $findPipe,
95 'findEquals' => $findPipe && $partCount > 1 && !isset( $this->parts[$partCount - 1]->eqpos ),
96 'inHeading' => $this->open ==
"\n",
107 if ( $this->open ==
"\n" ) {
108 $s = $this->savedPrefix . $this->parts[0]->out;
110 if ( $openingCount ===
false ) {
113 $s = substr( $this->open, 0, -1 );
115 substr( $this->open, -1 ),
116 $openingCount - strlen(
$s )
118 $s = $this->savedPrefix .
$s;
120 foreach ( $this->parts as $part ) {