![]() |
App Engine PHP SDK
v1 rev.445
The PHP runtime is available as an experimental Preview feature.
|
Public Member Functions | |
__construct ($url_path, $query_data=[], $options=[]) | |
getUrl () | |
getQueryData () | |
getName () | |
getDelaySeconds () | |
getMethod () | |
getHeaders () | |
add ($queue_name= 'default') | |
Public Attributes | |
const | MAX_DELAY_SECONDS = 2592000 |
const | MAX_NAME_LENGTH = 500 |
const | MAX_TASK_SIZE_BYTES = 102400 |
const | MAX_URL_LENGTH = 2083 |
const | NAME_PATTERN = '/^[a-zA-Z0-9_-]+$/' |
A PushTask encapsulates a unit of work that an application places onto a Push Queue for asnychronous execution. The queue executes that work by sending the task back to the application in the form of an HTTP request to one of the application's handlers. This class is immutable.
google\appengine\api\taskqueue\PushTask::__construct | ( | $url_path, | |
$query_data = [] , |
|||
$options = [] |
|||
) |
Construct a PushTask.
string | $url_path | The path of the URL handler for this task relative to your application's root directory. |
array | $query_data | The data carried by task, typically in the form of a set of key value pairs. This data will be encoded using http_build_query() and will be either:
|
array | $options | Additional options for the task. Valid options are:
|
google\appengine\api\taskqueue\PushTask::add | ( | $queue_name = 'default' | ) |
Adds the task to a queue.
string | $queue | The name of the queue to add to. Defaults to 'default'. |
TaskAlreadyExistsException | if a task of the same name already exists in the queue. |
TaskQueueException | if there was a problem using the service. |
google\appengine\api\taskqueue\PushTask::getDelaySeconds | ( | ) |
Return the task's execution delay, in seconds.
google\appengine\api\taskqueue\PushTask::getHeaders | ( | ) |
Return the task's headers.
google\appengine\api\taskqueue\PushTask::getMethod | ( | ) |
Return the task's HTTP method.
google\appengine\api\taskqueue\PushTask::getName | ( | ) |
Return the task's name if it was explicitly named.
google\appengine\api\taskqueue\PushTask::getQueryData | ( | ) |
Return the task's query data.
google\appengine\api\taskqueue\PushTask::getUrl | ( | ) |
Return the task's URL. This will be the task's URL path, plus any query parameters if the task's method is GET, HEAD, or DELETE.
const google\appengine\api\taskqueue\PushTask::MAX_DELAY_SECONDS = 2592000 |
A task may be scheduled up to 30 days into the future.