Extension:PhpTags Functions/Functions/Useful

From MediaWiki.org
Jump to navigation Jump to search

List of implemented objects[edit]

WebRequest[edit]

The WebRequest class is wrapper of original WebRequest class

class WebRequest {

    /* Methods */
    static array getArray( $name, $default = null )
    static bool getBool( $name, $default = false )
    static bool getCheck( $name )
    static mixed getCookie( $key, $default = null )
    static int getInt( $name, $default = 0 )
    static string getText( $name, $default = '' )
    static mixed getVal( $name, $default = null )
    static bool getValues( ... )
    static bool wasPosted()
}

More

List of implemented functions[edit]

  • mw_json_decode — Decodes a JSON string
  • mw_json_encode — Returns the JSON representation of a value
  • transclude — Returns text from parsing a wiki page specified by a title string (default namespace is the Template namespace) or a WTitle object, arguments given as an array of strings (string keys are used for named arguments)
  • uuid_create — Creates random UUID (example: 78f01ee7-8140-4c4d-83c0-f180684fecab)

List of implemented constants[edit]

  • UUID — Returns random UUID (alias of function uuid_create())

You can ask to add other functions on the talk page.