Hook into 'dispatch()'

Posted 1 year ago by Bahjaat

I am currently handling my job like

$job = new HandlePrintQueue($printqueue);
dispatch($job);

Right after that I am updating my $printqueue with:

$printqueue->dispatched(); // this will update the 'status'-field in the database

I'm searching for a while to hook into the 'Dispatcher' and do it from there, because I'm duplicating this code over and over again.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.