$wire

Represents an instance of ProcessWire connected with a set of API variables.

This class boots a ProcessWire instance. The current ProcessWire instance is represented by the $wire API variable.

// To create a new ProcessWire instance
$wire = new ProcessWire('/server/path/', 'https://hostname/url/');

Click any linked item for full usage details and examples. Hookable methods are indicated with the icon. In addition to those shown below, the ProcessWire class also inherits all the methods and properties of: Wire.

Show $var?     Show args?       Only hookable?    

Constants

NameReturnSummary 
ProcessWire::htaccessVersion const301Minimum required .htaccess file version 
ProcessWire::indexVersion const300Minimum required index.php version, represented by the PROCESSWIRE define 
ProcessWire::statusBoot const1Status when system is booting API variables available: $wire, $hooks, $config, $classLoader 
ProcessWire::statusDownload const32Status when current request will send a file download to client and exit (rather than rendering a page template file) All API variables available 
ProcessWire::statusExited const256Status when the request has finished abnormally (like a manual exit) @3.0.180  
ProcessWire::statusFailed const1024Status when the request failed due to an Exception or 404 API variables should be checked for availability before using. 
ProcessWire::statusFinished const128Status when the request has been fully delivered (but before a redirect) All API variables available 
ProcessWire::statusInit const2Status when system and modules are initializing All API variables available except for $page 
ProcessWire::statusNone const0Status prior to boot (no API variables available) 
ProcessWire::statusReady const4Status when system, $page and all API variables are ready All API variables available 
ProcessWire::statusRender const8Status when the current $page’s template file is being rendered, set right before render All API variables available 
ProcessWire::versionMajor const3Major version number 
ProcessWire::versionMinor const0Minor version number 
ProcessWire::versionRevision const251Reversion revision number 
ProcessWire::versionSuffix constNoneVersion suffix string (when applicable) 

For hooks

These methods are only useful for hooking and should not be called directly.

NameReturnSummary 
$this->finished()
NoneHookable ready for anyone that wants to hook when the request is finished
$this->init()
NoneHookable init for anyone that wants to hook immediately before any autoload modules initialized or after all modules initialized
$this->ready()
NoneHookable ready for anyone that wants to hook immediately before any autoload modules ready or after all modules ready

Properties

NameReturnSummaryDefault
adminTheme AdminTheme AdminThemeFramework null 
cache WireCache 
classLoader WireClassLoader 
config Config 
database WireDatabasePDO 
datetime WireDateTime 
fieldgroups Fieldgroups 
fields Fields 
fieldtypes Fieldtypes 
files WireFileTools 
fuel Fuel 
hooks WireHooks 
input WireInput 
languages Languages (present only if LanguageSupport installed) 
log WireLog 
mail WireMailTools 
modules Modules 
notices Notices 
page Page 
pages Pages 
pagesVersions PagesVersions null 
permissions Permissions 
process Process ProcessPageView 
profiler WireProfilerInterface 
roles Roles 
sanitizer Sanitizer 
session Session 
shutdown WireShutdown 
templates Templates 
urls Paths 
user User 
users Users 
wire ProcessWire 

Additional methods and properties

In addition to the methods and properties above, ProcessWire also inherits the methods and properties of these classes:

API reference based on ProcessWire core version 3.0.251