At service library, this interface class is used to register jobs to the service.

Job registration

Example callback:

 function cron_callback_method($args, &$handler)
 {
     $handler->print_error('got args:', $args);
     debug_print_r('got args:', $args);
     return true;
 }

Example job registration (for the method above):

midcom_services_at_interface::register(
  time() + 120,
  'org.openpsa.directmarketing',
  'cron_callback_method',
  array
  (
     'foo' => 'bar',
  ));
package midcom.services.at

 Methods

register (int $start, string $component, string $method, array $args)

Registers a job to the AT service.
Static

Parameters

$start

intTimestamp after which the job is run

$component

stringThe name of the component which should run the job

$method

stringThe method in interface class to call to run the job

$args

arrayArguments array for the method

Returns

booleanIndicating success/failure in registering the job