$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 const301Minimum 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 const135Reversion 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.135

Twitter updates

  • New post: Version 3.0.135 of ProcessWire on the dev branch focuses on some .htaccess updates, adds clarity to debug mode, and improves upon the installer— More
    5 July 2019
  • ProcessWire 3.0.133 adds a useful new Page::meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type— More
    14 June 2019
  • New post: This week we’ll take a look at 3 different WEBP image strategies that you can use in ProcessWire 3.0.132+. Then we’ll dive into a major update for the Google Client API module, and finish up by outlining some useful new updates in FormBuilder— More
    31 May 2019

Latest news

  • ProcessWire Weekly #270
    This week in the 270th issue of ProcessWire Weekly we're going to cover the SearchEngine module, feature some recent support forum highlights, and introduce a brand new site of the week. Read on!
    Weekly.pw / 13 July 2019
  • ProcessWire 3.0.135 core updates
    Version 3.0.135 of ProcessWire on the dev branch focuses on .htaccess updates, adds additional layers of security, adds clarity to debug mode, and improves upon the installer.
    Blog / 3 July 2019
  • Subscribe to weekly ProcessWire news

“Yesterday I sent the client a short documentation for their ProcessWire-powered website. Today all features already used with no questions. #cmsdoneright—Marc Hinse, Web designer/developer