[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/parser/ -> Preprocessor_DOM.php (summary)

Preprocessor using PHP's dom extension This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

File Size: 1939 lines (54 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 8 classes

Preprocessor_DOM:: (7 methods):
  __construct()
  newFrame()
  newCustomFrame()
  newPartNodeArray()
  memCheck()
  preprocessToObj()
  preprocessToXml()

PPDStack:: (8 methods):
  __construct()
  count()
  getAccum()
  getCurrentPart()
  push()
  pop()
  addPart()
  getFlags()

PPDStackElement:: (6 methods):
  __construct()
  getAccum()
  addPart()
  getCurrentPart()
  getFlags()
  breakSyntax()

PPDPart:: (1 method):
  __construct()

PPFrame_DOM:: (22 methods):
  __construct()
  newChild()
  cachedExpand()
  expand()
  implodeWithFlags()
  implode()
  virtualImplode()
  virtualBracketedImplode()
  __toString()
  getPDBK()
  getArguments()
  getNumberedArguments()
  getNamedArguments()
  isEmpty()
  getArgument()
  loopCheck()
  isTemplate()
  getTitle()
  setVolatile()
  isVolatile()
  setTTL()
  getTTL()

PPTemplateFrame_DOM:: (13 methods):
  __construct()
  __toString()
  cachedExpand()
  isEmpty()
  getArguments()
  getNumberedArguments()
  getNamedArguments()
  getNumberedArgument()
  getNamedArgument()
  getArgument()
  isTemplate()
  setVolatile()
  setTTL()

PPCustomFrame_DOM:: (5 methods):
  __construct()
  __toString()
  isEmpty()
  getArgument()
  getArguments()

PPNode_DOM:: (13 methods):
  __construct()
  getXPath()
  __toString()
  getChildren()
  getFirstChild()
  getNextSibling()
  getChildrenOfType()
  getLength()
  item()
  getName()
  splitArg()
  splitExt()
  splitHeading()


Class: Preprocessor_DOM  - X-Ref


__construct( $parser )   X-Ref


newFrame()   X-Ref

return: PPFrame_DOM

newCustomFrame( $args )   X-Ref

param: array $args
return: PPCustomFrame_DOM

newPartNodeArray( $values )   X-Ref

param: array $values
return: PPNode_DOM

memCheck()   X-Ref

return: bool

preprocessToObj( $text, $flags = 0 )   X-Ref
Preprocess some wikitext and return the document tree.
This is the ghost of Parser::replace_variables().

param: string $text The text to parse
param: int $flags Bitwise combination of:
return: PPNode_DOM

preprocessToXml( $text, $flags = 0 )   X-Ref

param: string $text
param: int $flags
return: string

Class: PPDStack  - X-Ref

Stack class to help Preprocessor::preprocessToObj()

__construct()   X-Ref


count()   X-Ref

return: int

getAccum()   X-Ref
No description

getCurrentPart()   X-Ref
No description

push( $data )   X-Ref
No description

pop()   X-Ref
No description

addPart( $s = '' )   X-Ref
No description

getFlags()   X-Ref

return: array

Class: PPDStackElement  - X-Ref


__construct( $data = array()   X-Ref
No description

getAccum()   X-Ref
No description

addPart( $s = '' )   X-Ref
No description

getCurrentPart()   X-Ref
No description

getFlags()   X-Ref

return: array

breakSyntax( $openingCount = false )   X-Ref
Get the output string that would result if the close is not found.

param: bool|int $openingCount
return: string

Class: PPDPart  - X-Ref


__construct( $out = '' )   X-Ref
No description

Class: PPFrame_DOM  - X-Ref

An expansion frame, used as a context to expand the result of preprocessToObj()

__construct( $preprocessor )   X-Ref
Construct a new preprocessor frame.

param: Preprocessor $preprocessor The parent preprocessor

newChild( $args = false, $title = false, $indexOffset = 0 )   X-Ref
Create a new child frame
$args is optionally a multi-root PPNode or array containing the template arguments

param: bool|array $args
param: Title|bool $title
param: int $indexOffset
return: PPTemplateFrame_DOM

cachedExpand( $key, $root, $flags = 0 )   X-Ref

param: string|int $key
param: string|PPNode_DOM|DOMDocument $root
param: int $flags
return: string

expand( $root, $flags = 0 )   X-Ref

param: string|PPNode_DOM|DOMDocument $root
param: int $flags
return: string

implodeWithFlags( $sep, $flags )   X-Ref

param: string $sep
param: int $flags
param: string|PPNode_DOM|DOMDocument $args,...
return: string

implode( $sep )   X-Ref
Implode with no flags specified
This previously called implodeWithFlags but has now been inlined to reduce stack depth

param: string $sep
param: string|PPNode_DOM|DOMDocument $args,...
return: string

virtualImplode( $sep )   X-Ref
Makes an object that, when expand()ed, will be the same as one obtained
with implode()

param: string $sep
param: string|PPNode_DOM|DOMDocument $args,...
return: array

virtualBracketedImplode( $start, $sep, $end )   X-Ref
Virtual implode with brackets

param: string $start
param: string $sep
param: string $end
param: string|PPNode_DOM|DOMDocument $args,...
return: array

__toString()   X-Ref
No description

getPDBK( $level = false )   X-Ref
No description

getArguments()   X-Ref

return: array

getNumberedArguments()   X-Ref

return: array

getNamedArguments()   X-Ref

return: array

isEmpty()   X-Ref
Returns true if there are no arguments in this frame

return: bool

getArgument( $name )   X-Ref
No description

loopCheck( $title )   X-Ref
Returns true if the infinite loop check is OK, false if a loop is detected

param: Title $title
return: bool

isTemplate()   X-Ref
Return true if the frame is a template frame

return: bool

getTitle()   X-Ref
Get a title of frame

return: Title

setVolatile( $flag = true )   X-Ref
Set the volatile flag

param: bool $flag

isVolatile()   X-Ref
Get the volatile flag

return: bool

setTTL( $ttl )   X-Ref
Set the TTL

param: int $ttl

getTTL()   X-Ref
Get the TTL

return: int|null

Class: PPTemplateFrame_DOM  - X-Ref

Expansion frame with template arguments

__construct( $preprocessor, $parent = false, $numberedArgs = array()   X-Ref

param: Preprocessor $preprocessor
param: bool|PPFrame_DOM $parent
param: array $numberedArgs
param: array $namedArgs
param: bool|Title $title

__toString()   X-Ref
No description

cachedExpand( $key, $root, $flags = 0 )   X-Ref

param: string|int $key
param: string|PPNode_DOM|DOMDocument $root
param: int $flags
return: string

isEmpty()   X-Ref
Returns true if there are no arguments in this frame

return: bool

getArguments()   X-Ref
No description

getNumberedArguments()   X-Ref
No description

getNamedArguments()   X-Ref
No description

getNumberedArgument( $index )   X-Ref
No description

getNamedArgument( $name )   X-Ref
No description

getArgument( $name )   X-Ref
No description

isTemplate()   X-Ref
Return true if the frame is a template frame

return: bool

setVolatile( $flag = true )   X-Ref
No description

setTTL( $ttl )   X-Ref
No description

Class: PPCustomFrame_DOM  - X-Ref

Expansion frame with custom arguments

__construct( $preprocessor, $args )   X-Ref
No description

__toString()   X-Ref
No description

isEmpty()   X-Ref

return: bool

getArgument( $index )   X-Ref
No description

getArguments()   X-Ref
No description

Class: PPNode_DOM  - X-Ref


__construct( $node, $xpath = false )   X-Ref


getXPath()   X-Ref

return: DOMXPath

__toString()   X-Ref
No description

getChildren()   X-Ref

return: bool|PPNode_DOM

getFirstChild()   X-Ref

return: bool|PPNode_DOM

getNextSibling()   X-Ref

return: bool|PPNode_DOM

getChildrenOfType( $type )   X-Ref

param: string $type
return: bool|PPNode_DOM

getLength()   X-Ref

return: int

item( $i )   X-Ref

param: int $i
return: bool|PPNode_DOM

getName()   X-Ref

return: string

splitArg()   X-Ref
Split a "<part>" node into an associative array containing:
- name          PPNode name
- index         String index
- value         PPNode value

return: array

splitExt()   X-Ref
Split an "<ext>" node into an associative array containing name, attr, inner and close
All values in the resulting array are PPNodes. Inner and close are optional.

return: array

splitHeading()   X-Ref
Split a "<h>" node

return: array



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1