48 'names' => [ 2 =>
null ],
54 'names' => [ 2 =>
null ],
68 $config = RequestContext::getMain()->getConfig();
71 $threshold = $config->get(
'PreprocessorCacheThreshold' );
72 if ( $threshold ===
false || $length < $threshold || $length > 1e6 ) {
76 $cache = ObjectCache::getLocalClusterInstance();
78 defined(
'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
79 md5( $text ), $flags );
84 LoggerFactory::getInstance(
'Preprocessor' )
85 ->info(
"Cached preprocessor output (key: $key)" );
97 $config = RequestContext::getMain()->getConfig();
100 $threshold = $config->get(
'PreprocessorCacheThreshold' );
101 if ( $threshold ===
false || $length < $threshold || $length > 1e6 ) {
105 $cache = ObjectCache::getLocalClusterInstance();
108 defined(
'static::CACHE_PREFIX' ) ? static::CACHE_PREFIX : static::class,
109 md5( $text ), $flags );
117 if ( $version !== static::CACHE_VERSION ) {
121 LoggerFactory::getInstance(
'Preprocessor' )
122 ->info(
"Loaded preprocessor output from cache (key: $key)" );
174 const RECOVER_ORIG = self::NO_ARGS | self::NO_TEMPLATES | self::NO_IGNORE |
175 self::RECOVER_COMMENTS | self::NO_TAGS;
189 public function newChild(
$args =
false, $title =
false, $indexOffset = 0 );
206 public function expand( $root, $flags = 0 );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
preprocessToObj( $text, $flags=0)
Preprocess text to a PPNode.
cacheGetTree( $text, $flags)
Attempt to load a precomputed document tree for some given wikitext from the cache.
array $rules
Brace matching rules.
newPartNodeArray( $values)
Create a new custom node for programmatic use of parameter replacement as used in some extensions.
cacheSetTree( $text, $flags, $tree)
Store a document tree in the cache.
newFrame()
Create a new top-level frame for expansion of a page.
newCustomFrame( $args)
Create a new custom frame for programmatic use of parameter replacement as used in some extensions.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
isEmpty()
Returns true if there are no arguments in this frame.
getArguments()
Returns all arguments of this frame.
const SUPPORTS_INDEX_OFFSET
This constant exists when $indexOffset is supported in newChild()
getTTL()
Get the TTL of the frame's output.
getArgument( $name)
Get an argument to this frame by name.
cachedExpand( $key, $root, $flags=0)
Expand a document tree node, caching the result on its parent with the given key.
getNumberedArguments()
Returns all numbered arguments of this frame.
isVolatile()
Get the "volatile" flag.
virtualBracketedImplode( $start, $sep, $end)
Virtual implode with brackets.
implodeWithFlags( $sep, $flags)
Implode with flags for expand()
implode( $sep)
Implode with no flags specified.
setTTL( $ttl)
Set the TTL of the output of this frame and all of its ancestors.
loopCheck( $title)
Returns true if the infinite loop check is OK, false if a loop is detected.
virtualImplode( $sep)
Makes an object that, when expand()ed, will be the same as one obtained with implode()
expand( $root, $flags=0)
Expand a document tree node.
isTemplate()
Return true if the frame is a template frame.
getTitle()
Get a title of frame.
getNamedArguments()
Returns all named arguments of this frame.
newChild( $args=false, $title=false, $indexOffset=0)
Create a child frame.
setVolatile( $flag=true)
Set the "volatile" flag.
There are three types of nodes:
item( $i)
Returns an item of an array-type node.
getLength()
Returns the length of the array, or false if this is not an array-type node.
splitArg()
Split a "<part>" node into an associative array containing: name PPNode name index String index value...
splitExt()
Split an "<ext>" node into an associative array containing name, attr, inner and close All values in ...
getFirstChild()
Get the first child of a tree node.
getName()
Get the name of this node.
getChildren()
Get an array-type node containing the children of this node.
getChildrenOfType( $type)
Get all children of this tree node which have a given name.
splitHeading()
Split an "<h>" node.
getNextSibling()
Get the next sibling of any node.
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))