30.07.2012 Views

Reference Guide

Reference Guide

Reference Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Class Methods<br />

ZendJobQueue::__construct<br />

Creates a ZendJobQueue object connected to a Job Queue daemon.<br />

Available since version 5.0<br />

Description<br />

void ZendJobQueue::__construct ([ string $queue ])<br />

Parameters<br />

queue<br />

API <strong>Reference</strong><br />

This can be one of: 1. No value specified - the default binding will be used. 2. A named queue as<br />

defined in the named queues directive - In such a case, the client will connect to the binding<br />

specified by the directive, and the application name used will be the value provided. 3. A literal<br />

binding URL - the URL will be used to connect to the daemon directly, and no application name<br />

will be defined. 4. If a string is provided which does not match a binding URL format, and has no<br />

alias defined for it, an exception will be thrown. . The default value is taken from default_binding<br />

directive<br />

ZendJobQueue::createHttpJob<br />

Creates a new URL based job to make the Job Queue Daemon call given $script with given $vars<br />

Available since version 5.0<br />

Description<br />

int ZendJobQueue::createHttpJob (string $url, array $vars, mixed<br />

$options)<br />

Parameters<br />

url<br />

vars<br />

options<br />

An absolute URL of the script to call<br />

An associative array of variables which will be passed to the script. The total data size of this<br />

array should not be greater than the size defined in the zend_jobqueue.max_message_size<br />

directive.<br />

An associative array of additional options. The elements of this array can define job priority,<br />

predecessor, persistence, optional name, additional attributes of HTTP request as HTTP<br />

headers, etc The following options are supported: "name" - Optional job name "priority" - Job<br />

priority (see corresponding constants) "predecessor" - Integer predecessor job id "persistent" -<br />

Boolean (keep in history forever) "schedule_time" - Time when job should be executed<br />

"schedule" - CRON-like scheduling command "http_headers" - Array of additional HTTP headers<br />

Return Value<br />

A job identifier which can be used to retrieve the job status<br />

301

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!