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...
$PLG->dispatch('handle_modify', \&Links::User::Modify::handle);
}
which jumps to a class after dispatching the plugin, instead do something like...
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
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