How does Drupal Work? I need Drupal Order of execution and references

Example Modx Order of execution
http://wiki.modxcms.com/index.php/Order_of_execution

Comments

api.drupal.org

There is documentation of the Drupal API, including an explanation of the hook system, at api.drupal.org. The hook system is the essential activity dispatcher and the primary way a module interacts with the core.

Especially read the explanation of Drupal's use of design patterns as an alternative to PHP's not-quite-baked object notation:

http://api.drupal.org/api/file/developer/topics/oop.html/6

(This may change as Drupal drops support for PHP4 in future releases.)

Oh no, I need order of

Oh no, I need order of execution like ModxCMS

1 index.php initiates an "ob" (ob_start) object, and a new DocumentParser object called $modx.
2 index.php calls $modx->executeParser().
3 Parser gets site settings ($modx->config array, such as $modx->config['site_name']).
4 Parser checks site's available status and outputs the unavailable page or message if site is unavailable. Done.
5 Parser unpublishes/publishes all documents that need to be published/unpublished at this time.
6 Parser determines from the URL request how to get the page to be parsed (site_start? alias? docID?) and works out the ID of the document it wants.
...

Drupal:
1. index.php load includes/bootstrap.inc
2. bootstrap load config...
....

Hmmm, I don't suppose you'd

Hmmm, I don't suppose you'd like to write one would you? Seriously though, I don't think such documentation exists online at present, though the Pro Drupal Development book does have some of this info. Your best bet is probably to step through the code with a debugger.

gpk
----
www.alexoria.co.uk

How to debug?

How to debug?

I use XAMPP on my laptop

I use XAMPP on my laptop with Eclipse and Xdebug extension. There's some info on setting this up somewhere here if you search for it.

gpk
----
www.alexoria.co.uk

Check this out: Drupal's

Check this out: Drupal's page serving mechanism (4.6). It's outdated, but I think most of it still applies.

See order of execution for a given site

Start with this: http://www.lullabot.com/articles/drupal-exposed

Here's sample output (with microtime prefixed: drupal_set_message(microtime(TRUE) . ": hook_$hook");
) from a mostly stock D6 install:

1333391458.3102: hook_init
1333391458.3143: hook_node_info
1333391458.3144: hook_db_rewrite_sql
1333391458.3147: hook_nodeapi
1333391458.315: hook_db_rewrite_sql
1333391458.3171: hook_nodeapi
1333391458.3172: hook_link
1333391458.3172: hook_link_alter
1333391458.3218: hook_nodeapi
1333391458.3219: hook_link_alter
1333391458.3228: hook_db_rewrite_sql
1333391458.3228: hook_db_rewrite_sql
1333391458.3398: hook_db_rewrite_sql
1333391458.3424: hook_node_grants
1333391458.3425: hook_node_grants
1333391458.3461: hook_node_grants
1333391458.3475: hook_translated_menu_link_alter
1333391458.3476: hook_translated_menu_link_alter
1333391458.3477: hook_translated_menu_link_alter
1333391458.3478: hook_translated_menu_link_alter
1333391458.3491: hook_node_grants

--
Devbee - http://devbee.com/

The hint is good but isn't it

The hint is good but isn't it a bit late? ;)

Definitely not too late

This page pops up prominently in search results. In fact, I just ended up here once more after looking for this answer again.

--
Devbee - http://devbee.com/

Thank you for posting this

Thank you for posting this que. I'm trying to use these ideas to cause Drupal to call a hook function for custom module, instead of the same hook function for a contrib module.

Good post..valuable matter

Good post..valuable matter sharing ..really searching a hook for custom module later i got here
Software development company

nobody click here