Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

dispatch plugin, then run code inside script?

Quote Reply
dispatch plugin, then run code inside script?
hi guys,

Can anyone show me how you use the dispatch plugin feature and run code below it rather than specifying a class method to run/jump to?

So for eg. instead of...

Code:
if ($PLG->dispatch('check_request', \&Links::check_request)) {
$PLG->dispatch('handle_modify', \&Links::User::Modify::handle);
}

which jumps to a class after dispatching the plugin, instead do something like...

Code:
if ($PLG->dispatch('check_request', \&Links::check_request)) {
if ($PLG->dispatch('handle_modify') {
RUN THE CODE THAT'S HERE
}
}

which means the actual code for that script is located IN that script, rather than in another external class.

regan
Subject Author Views Date
Thread dispatch plugin, then run code inside script? ryel01 2263 Jun 22, 2009, 5:15 PM
Post Re: [ryel01] dispatch plugin, then run code inside script?
brewt 2180 Jun 22, 2009, 6:06 PM