$wire API variable / ProcessWire class

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?        

Constants

NameReturnSummary 
ProcessWire::htaccessVersion const300Minimum required .htaccess file version 
ProcessWire::indexVersion const300Minimum required index.php version, represented by the PROCESSWIRE define 
ProcessWire::statusBoot const0Status when system is booting 
ProcessWire::statusFailed const1024Status when the request failed due to an Exception or 404 
ProcessWire::statusFinished const16Status when the request has been fully delivered 
ProcessWire::statusInit const2Status when system and modules are initializing 
ProcessWire::statusReady const4Systus when system, $page and API variables are ready 
ProcessWire::statusRender const8Status when the current $page’s template file is being rendered 
ProcessWire::versionMajor const3Major version number 
ProcessWire::versionMinor const0Minor version number 
ProcessWire::versionRevision const124Reversion revision number 
ProcessWire::versionSuffix const(nothing)Version suffix string (when applicable) 

For hooks

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

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

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.124

Twitter updates

  • New post: In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124— More
    11 January 2019
  • New ProcessWire main site rebuild ready for preview— More
    4 January 2019
  • Happy Holidays! This latest master version of ProcessWire contains hundreds of new additions, fixes, optimizations and more. This post covers all the highlights— More
    21 December 2018

Latest news

  • ProcessWire Weekly #245
    In the 245th issue of ProcessWire Weekly we're going to focus on some new documentation additions made just this week, cover a couple of new third party modules from Bernhard Baumrock, and introduce a magnificent new travel website called Uncover Colombia. Read on!
    Weekly.pw / 19 January 2019
  • ProcessWire 3.0.124 and new website launched
    In this week’s post, we’ll take a look a look at the new website and focus on some parts of it and how they were built. Then we’ll dive into the latest version of ProcessWire on the dev branch, version 3.0.124.
    Blog / 11 January 2019
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK