google/appengine/api/taskqueue/PushTask.php
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
\google\appengine\api\taskqueue\PushTask
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.
Constants
Methods
__construct
(string $url_path, array $query_data = array(), array $options = array())
: void
Construct a PushTask.
Name | Type | Description |
---|---|---|
$url_path | string |
The path of the URL handler for this task relative to your application's root directory. |
$query_data | array |
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:
|
$options | array |
Additional options for the task. Valid options are:
|
add
( $queue_name = 'default')
: string
Adds the task to a queue.
Name | Type | Description |
---|---|---|
$queue_name |
Type | Description |
---|---|
string | The name of the task. |
Exception | Description |
---|---|
\google\appengine\api\taskqueue\TaskAlreadyExistsException | if a task of the same name already exists in the queue. |
\google\appengine\api\taskqueue\TaskQueueException | if there was a problem using the service. |
getDelaySeconds
()
: float
Return the task's execution delay, in seconds.
Type | Description |
---|---|
float | The task's execution delay in seconds. |
getHeaders
()
: string[]
Return the task's headers.
Type | Description |
---|---|
string[] | The headers that will be sent when the task is executed. This list is not exhaustive as the backend may add more headers at execution time. The array is numerically indexed and of the same format as that returned by the standard headers_list() function. |
getMethod
()
: string
Return the task's HTTP method.
Type | Description |
---|---|
string | The task's HTTP method, i.e. one of 'DELETE', 'GET', 'HEAD', 'POST', 'PUT'. |
getName
()
: string
Return the task's name if it was explicitly named.
Type | Description |
---|---|
string | The task's name if it was explicity named, or empty string if it will be given a uniquely generated name in the queue. |
getQueryData
()
: array
Return the task's query data.
Type | Description |
---|---|
array | The task's query data. |