Ticket #120 (new enhancement)

Opened 3 months ago

Replace Solar start and stop hook scripts with callbacks

Reported by: Antti Holvikari Assigned to: pmjones
Priority: major Component: code
Keywords: Cc:

Description

I've written a patch for replacing hook scripts run upon Solar::start() and Solar::stop() with callbacks. As discussed, this is much more flexible and allows one to call "init" methods such as starting a timer for debugging purposes.

This patch allows normal PHP callbacks and calls directly from a Solar registry object:

// simple function callback.
// call var_dump with one array as param.
$config['Solar']['start'][] = array('var_dump', array('key' => 'value'));
`
// object call:
// call Example_Class::method statically with one param
$config['Solar']['stop'][] = array(array('Example_Class', 'method'), 'param0');

// registry call:
// call method `method` from registry object `key`
$config['Solar']['start']['key'] = 'method';

Attachments

Solar_callbacks.patch (2.0 kB) - added by Antti Holvikari on 03/28/08 10:34:42.
Patch against HEAD for Solar.php

Change History

03/28/08 10:34:42 changed by Antti Holvikari

  • attachment Solar_callbacks.patch added.

Patch against HEAD for Solar.php


Add/Change #120 (Replace Solar start and stop hook scripts with callbacks)