MediaWiki  master
PPFrame.php
Go to the documentation of this file.
1 <?php
25 interface PPFrame {
26  const NO_ARGS = 1;
27  const NO_TEMPLATES = 2;
28  const STRIP_COMMENTS = 4;
29  const NO_IGNORE = 8;
30  const RECOVER_COMMENTS = 16;
31  const NO_TAGS = 32;
32 
33  const RECOVER_ORIG = self::NO_ARGS | self::NO_TEMPLATES | self::NO_IGNORE |
34  self::RECOVER_COMMENTS | self::NO_TAGS;
35 
38 
48  public function newChild( $args = false, $title = false, $indexOffset = 0 );
49 
57  public function cachedExpand( $key, $root, $flags = 0 );
58 
65  public function expand( $root, $flags = 0 );
66 
74  public function implodeWithFlags( $sep, $flags /*, ... */ );
75 
82  public function implode( $sep /*, ... */ );
83 
91  public function virtualImplode( $sep /*, ... */ );
92 
101  public function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
102 
108  public function isEmpty();
109 
114  public function getArguments();
115 
120  public function getNumberedArguments();
121 
126  public function getNamedArguments();
127 
133  public function getArgument( $name );
134 
141  public function loopCheck( $title );
142 
147  public function isTemplate();
148 
160  public function setVolatile( $flag = true );
161 
171  public function isVolatile();
172 
185  public function getTTL();
186 
196  public function setTTL( $ttl );
197 
203  public function getTitle();
204 }
virtualBracketedImplode( $start, $sep, $end)
Virtual implode with brackets.
setTTL( $ttl)
Set the TTL of the output of this frame and all of its ancestors.
isEmpty()
Returns true if there are no arguments in this frame.
getTTL()
Get the TTL of the frame&#39;s output.
getArguments()
Returns all arguments of this frame.
getNamedArguments()
Returns all named arguments of this frame.
implode( $sep)
Implode with no flags specified.
const RECOVER_COMMENTS
Definition: PPFrame.php:30
getNumberedArguments()
Returns all numbered arguments of this frame.
const NO_ARGS
Definition: PPFrame.php:26
newChild( $args=false, $title=false, $indexOffset=0)
Create a child frame.
const NO_IGNORE
Definition: PPFrame.php:29
if( $line===false) $args
Definition: cdb.php:64
setVolatile( $flag=true)
Set the "volatile" flag.
const NO_TEMPLATES
Definition: PPFrame.php:27
implodeWithFlags( $sep, $flags)
Implode with flags for expand()
const RECOVER_ORIG
Definition: PPFrame.php:33
namespace and then decline to actually register it file or subcat img or subcat $title
Definition: hooks.txt:912
isVolatile()
Get the "volatile" flag.
getTitle()
Get a title of frame.
getArgument( $name)
Get an argument to this frame by name.
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
Definition: injection.txt:35
expand( $root, $flags=0)
Expand a document tree node.
const NO_TAGS
Definition: PPFrame.php:31
cachedExpand( $key, $root, $flags=0)
Expand a document tree node, caching the result on its parent with the given key. ...
Allows to change the fields on the form that will be generated $name
Definition: hooks.txt:271
const STRIP_COMMENTS
Definition: PPFrame.php:28
virtualImplode( $sep)
Makes an object that, when expand()ed, will be the same as one obtained with implode() ...
isTemplate()
Return true if the frame is a template frame.
const SUPPORTS_INDEX_OFFSET
This constant exists when $indexOffset is supported in newChild()
Definition: PPFrame.php:37
loopCheck( $title)
Returns true if the infinite loop check is OK, false if a loop is detected.