API Variables


Primary / Input & Output / Users & Access / Utilities & Helpers / System

Primary

Name Summary
$page Class used by all Page objects in ProcessWire.
$pages Enables loading and manipulation of Page objects, to and from the database.
$modules Loads and manages all modules in ProcessWire.
$user The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.

Input & Output

Name Summary
$input Provides a means to get user input from URLs, GET, POST, and COOKIE variables and more.
$sanitizer Provides methods for sanitizing and validating user input, preparing data for output, and more.
$session Maintains sessions in ProcessWire, authentication, persistent variables, notices and redirects.
$log Enables creation of logs, logging of events, and management of logs.

Users & Access

Name Summary
$user The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.
$users Manages all users (User objects) in ProcessWire.
$permissions Provides management of all Permission pages independent of users, for access control.
$roles Provides management of all Role pages for access control.

Utilities & Helpers

Name Summary
$cache Provides easy, persistent caching of markup, strings, arrays or PageArray objects.
$datetime The $datetime API variable provides helpers for working with dates/times and conversion between formats.
$files Helpers for working with files and directories.
$mail Provides an API interface to email and WireMail.

System

Name Summary
$config Holds ProcessWire configuration settings as defined in /wire/config.php and /site/config.php.
$database All database operations in ProcessWire are performed via this PDO-style database class.
$fields Manages all custom fields in ProcessWire
$templates Manages and provides access to all the Templates.
Languages API variable $languages enables access to all Language pages and various helper methods.
$classLoader The ProcessWire $classLoader API variable handles autoloading of classes and modules.

Core Classes


Primary / Pages / Arrays / Modules / Files & Images / Fields & Templates / Additional

Primary

Name Summary
Wire Wire is the base class for most ProcessWire classes and modules.
WireData WireData is the base data-storage class used by many ProcessWire object types and most modules.
WireArray WireArray is the base iterable array type used throughout the ProcessWire framework.

Pages

Name Summary
Page Class used by all Page objects in ProcessWire.
NullPage NullPage is a type of Page object returned by many API methods to indicate a non-match.
User The $user API variable is a type of page representing the current user, and the User class is Page type used for all users.
Role Role is a type of Page used for grouping permissions to users.
Permission Permission is a Page type used for storing an individual permission.

Arrays

Name Summary
WireArray WireArray is the base iterable array type used throughout the ProcessWire framework.
PageArray PageArray is a paginated type of WireArray that holds multiple Page objects.
PaginatedArray PaginatedArray is a type of WireArray that supports pagination of items within it.

Modules

Name Summary
Module Module is the primary PHP interface for module types in ProcessWire.
Fieldtype Fieldtype is a module type used to represent a type of field. All Fieldtype modules descend from this.
Inputfield Inputfield is the base class for modules that collect user input for fields.
Process Process modules are self contained applications that run in the ProcessWire admin.
Textformatter A simple module type that provides formatting of text fields.

Files & Images

Name Summary
Pagefile Represents a single file item attached to a page, typically via a File Fieldtype.
Pagefiles Pagefiles is a type of WireArray that contains Pagefile objects. It also acts as the value for multi-file fields in ProcessWire.
Pageimage Represents an image item attached to a page, typically via an Image Fieldtype.
Pageimages Pageimages are a type of WireArray containing Pageimage objects. They represent the value of multi-image field in ProcessWire.
PagefilesManager Manages files and file directories for a page independent of a particular field.

Fields & Templates

Name Summary
Field Field represents a custom field that is used on a Page.
Fieldgroup Fieldgroup is a type of WireArray that holds a group of Field objects for template(s).
Template Template is a Page’s connection to fields (via a Fieldgroup), access control, and output via a template file.

Additional

Name Summary
HookEvent HookEvent is a type provided to hook functions with information about the event.
InputfieldWrapper A type of Inputfield that contains other Inputfield objects as children. Commonly a form or a fieldset.
WireHttp WireHttp enables you to send HTTP requests to URLs, download files, and more.
WireMail A module type that handles sending of email in ProcessWire