Jump to content

Recommended Posts

Posted

What I would like to know, and haven't found if it exists, is a mapping for the order of files invoked by PW.
I see quite a few references to init.php and ready.php, etc. files, but have no idea where they are executed in the precedence order.
Is there a 'map' that shows the files in order of execution, and their corresponding definition (use this file when...) ?

similar to:

         index.php
                |
         blah...blah
               |
            init
               |
           ready
               |
         blah...blah
               |
 

  • Like 2
Posted
  • index.php
  • ProcessWire Bootstrap
  • Module Init (Hooks to ProcessWire::init)
  • init.php
  • ProcessWire Core ready
  • Hooks to ProcessWire::ready
  • ready.php
  • Template Rendering
    • prependedTemplateFiles
    • template.php
    • appendedTemplateFiles
  • Hooks to ProcessWire::finished
  • finished.php
  • Shutdown

This should be almost complete, but I don't guarantee about anything :D

 

  • Like 9
Posted

I posted something like this a few years ago, but that's obviously not up to date with current versions of ProcessWire. Would be interesting to create an updated version and compare these side by side, just to see how far we've come since then :)

processwire-page-rendering.jpg

  • Like 10
Posted (edited)

I recently discovered an app that maybe help you on that, it's called Blackfire https://blackfire.io
See a screenshot of an example from its website. Install on your server (or local) and give it a try and maybe compare with @teppo's diagram above. :)

Edit: this is a Symfony app, and not mine, just to clarify. 

blackfire.png

Edited by Sérgio
Clarify
  • Like 3
Posted

Blackfire is nice, but ProcessWire is not as linear as this Screenshot does look like. ProcessWire's graph is more circular as most method calls go through Wire::__call() to be hookable.

  • Like 3

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...