\

Namespaces

Tests

Classes

AbuseFilter This file is part of Peachy MediaWiki Bot API
AssertFailure Assertation error bot
AutoLoader Class AutoLoader
AutoUpdate Checks for a new version of Peachy and installs it if there is one.
BadEntryError Error for wrong parameters in a function
BadTitle Invalid Title Error
CheckUser This file is part of Peachy MediaWiki Bot API
CodeReview This file is part of Peachy MediaWiki Bot API
CURLError Generic cURL Error
DBError Generic Database Error
DeleteError Generic Delete Error
DependancyError Misspelling of "dependency", used for backwards compatibility
DependencyError Missing DependencyError Error
EditError Generic Edit Error
Email This file is part of Peachy MediaWiki Bot API
EmailError Generic Email Error
FlaggedRevs This file is part of Peachy MediaWiki Bot API
GlobalBlocking This file is part of Peachy MediaWiki Bot API
GlobalUserInfo This file is part of Peachy MediaWiki Bot API
HookError Peachy Hook Error
Hooks Hooks class Stores and runs {@link http://wiki.peachy.compwhizii.net/wiki/Manual/Hooks hooks}
HTTP HTTP Class, stores cURL functions
Image
ImageError Generic Image Error
IRC This file is part of Peachy MediaWiki Bot API
lime_colorizer lime_colorizer class.
lime_coverage lime_coverage class.
lime_harness lime_harness class.
lime_output lime_output class.
lime_registration lime_registration class.
lime_test Unit test library.
LoggedOut Logged Out Error
LoginError Login Error
MoveError Generic Move Error
MWAPIError Generic API Error
NoTitle No Title Error
NoUser No User Error
Page Page class, defines methods that all get/modify page info
Peachy Base Peachy class, used to generate all other classes
PeachyAWBFunctions PeachyAWBFunctions class.
PeachyError Generic Peachy Error
PermissionsError Error with user permissions
ProtectError Generic Protect Error
RFA An RFA object contains the parsed information for an RFA
RPED This file is part of Peachy MediaWiki Bot API
SimpleIRC
SiteMatrix This file is part of Peachy MediaWiki Bot API
SSH SSH Class, Establishes and maintains a remote SSH connection
UndeleteError Generic Undelete Error
User User class, stores methods that relate to a specific user
UserBlocked Blocked User Error
Wiki Wiki class Stores and runs methods that don't fit in User, Page, or Image, etc.
Xml Module of static functions for generating XML
XMLError Generic XML Error
XMLParse This file is part of Peachy MediaWiki Bot API
XmlSelect

Constants

MINMW

MINMW

Minimum MediaWiki version that is required for Peachy

MINPHP

MINPHP

Minimum PHP version that is required for Peachy

PEACHY_PHPUNIT_TESTS

PEACHY_PHPUNIT_TESTS

PEACHYVERSION

PEACHYVERSION

The version that Peachy is running

PECHO_ERROR

PECHO_ERROR

PECHO constants, used for {@link outputText}()

PECHO_FATAL

PECHO_FATAL

PECHO constants, used for {@link outputText}()

PECHO_NORMAL

PECHO_NORMAL

PECHO constants, used for {@link outputText}()

PECHO_NOTICE

PECHO_NOTICE

PECHO constants, used for {@link outputText}()

PECHO_VERBOSE

PECHO_VERBOSE

PECHO constants, used for {@link outputText}()

PECHO_WARN

PECHO_WARN

PECHO constants, used for {@link outputText}()

TC_HTML

TC_HTML

TC_MYSQL

TC_MYSQL

TC_PCRE

TC_PCRE

TC_SELF

TC_SELF

TC_SHELL

TC_SHELL

Functions

__autoload()

__autoload(  $class) 

Parameters

$class

cecho()

cecho(string  $text, boolean  $return = false) : string

Echo function with color capabilities.

Syntax:

[Text to colorize|NAME] where NAME is the name of a defined style. For example:

This text is standard terminal color. [This text will be yellow.|COMMENT] [This text will be white on red.|ERROR]

Defined styles:

  • ERROR: White on red, bold
  • INFO: Green text, bold
  • PARAMETER: Cyan text
  • COMMENT: Yellow text
  • GREEN_BAR: White on green, bold
  • RED_BAR: White on red, bold
  • YELLOW_BAR: Black on yellow, bold
  • INFO_BAR: Cyan text, bold

You can define your own styles by using this syntax:

lime_colorizer::style('STYLE_NAME', array('bg' => 'red', 'fg' => 'white'));

(Available colors: black, red, green, yellow, blue, magenta, cyan, white)

You can also set options for how the text is formatted (not available on all systems):

lime_colorizer::style('STYLE_NAME', array('bg' => 'red', 'fg' => 'white', 'bold' => true )); (sets bold text)

Available options: bold, underscore, blink, reverse, conceal

Parameters

string $text
boolean $return

Returns

string

checkExclusion()

checkExclusion(\Wiki  $wiki, string  $text = '', string  $pgUsername = null, string|null  $optout = null, string|null  $taskname = null) : boolean

Detects the presence of a nobots template or one that denies editing by ours

Parameters

\Wiki $wiki

Wiki class

string $text

Text of the page to check (default: '')

string $pgUsername

Username to search for in the template (default: null)

string|null $optout

Text to search for in the optout= parameter. (default: null)

string|null $taskname

(default: null)

Returns

boolean —

True on match of an appropriate nobots template

getSiteObject()

getSiteObject() : \Wiki|boolean

Gets the first defined Wiki object

Returns

\Wiki|boolean

getTextDiff()

getTextDiff() 

Generates a diff between two strings

iconv()

iconv(mixed  $from, mixed  $to, mixed  $string) : void

Fallback iconv function.

iconv support is not in the default configuration and so may not be present. Assume will only ever use utf-8 and iso-8859-1. This will not work in all circumstances.

Parameters

mixed $from
mixed $to
mixed $string

iin_array()

iin_array(mixed  $needle, array  $haystack, boolean  $strict = false) : boolean

Case insensitive in_array function

Parameters

mixed $needle

What to search for

array $haystack

Array to search in

boolean $strict

Returns

boolean —

True if $needle is found in $haystack, case insensitive

in_array_recursive()

in_array_recursive(string  $needle, array  $haystack, boolean  $insensitive = false) : boolean

Recursive in_array function

Parameters

string $needle

What to search for

array $haystack

What to search in

boolean $insensitive

Whether or not to do a case-insensitive search

Returns

boolean —

True if $needle is found in $haystack

in_string()

in_string(string  $needle, string  $haystack, boolean  $insensitive = false) : boolean

Returns whether or not a string is found in another Shortcut for strpos()

Parameters

string $needle

What to search for

string $haystack

What to search in

boolean $insensitive

Whether or not to do a case-insensitive search

Returns

boolean —

True if $needle is found in $haystack

initImage()

initImage(string  $filename = null) : \Image

Returns an instance of the Image class as specified by $filename or $pageid

Parameters

string $filename

Filename

Returns

\Image

initPage()

initPage(mixed  $title = null, mixed  $pageid = null, boolean  $followRedir = true, boolean  $normalize = true) : \Page

Returns an instance of the Page class as specified by $title or $pageid

Parameters

mixed $title

Title of the page (default: null)

mixed $pageid

ID of the page (default: null)

boolean $followRedir

Should it follow a redirect when retrieving the page (default: true)

boolean $normalize

Should the class automatically normalize the title (default: true)

Returns

\Page

initUser()

initUser(mixed  $pgUsername) : \User|false

Returns an instance of the User class as specified by $pgUsername

Parameters

mixed $pgUsername

Username

Returns

\User|false

istainted()

istainted(mixed  $var) : integer

Fallback istainted function.

Parameters

mixed $var

Returns

integer

mb_strlen()

mb_strlen(string  $str) : integer

Fallback implementation of mb_strlen.

Parameters

string $str

String to get

Returns

integer

mb_substr()

mb_substr(  $str,   $start,   $count = 'end') 

Fallback implementation for mb_substr. This is VERY slow, from 5x to 100x slower. Use only if necessary.

Parameters

$str
$start
$count

mb_substr_split_unicode()

mb_substr_split_unicode(  $str, integer  $splitPos) : integer

Continuing support for mb_substr. Do not use.

Parameters

$str
integer $splitPos

Returns

integer

outputText()

outputText(string  $text, integer  $cat, string  $func = 'echo') : void

Outputs text if the given category is in the allowed types

Parameters

string $text

Text to display

integer $cat

Category of text, such as PECHO_WARN, PECHO_NORMAL

string $func

peachyCheckPHPVersion()

peachyCheckPHPVersion(string  $check_version) : void

Simple version_compare() wrapper

Parameters

string $check_version

string

Throws

\DependencyError

pecho()

pecho(string  $text, integer  $cat, string  $func = 'echo') : void

Shortcut for {@link outputText}

Parameters

string $text

Text to display

integer $cat

Category of text, such as PECHO_WARN, PECHO_NORMAL

string $func

rglob()

rglob(string  $pattern = '*', integer  $flags, string  $path = '') : array

Recursive glob() function.

Parameters

string $pattern

. (default: '*')

integer $flags

. (default: 0)

string $path

. (default: '')

Returns

array

strtoupper_safe()

strtoupper_safe(  $str) : string

Parameters

$str

Returns

string

taint()

taint(mixed  $var, integer  $level) : void

Fallback taint function.

Parameters

mixed $var
integer $level

untaint()

untaint(mixed  $var, integer  $level) : void

Fallback untaint function.

Parameters

mixed $var
integer $level