AsyncTask
  • Package
  • Class
  • Todo

Packages

  • asynctask

Classes

  • AsyncTask

Class AsyncTask

AsyncTask enables proper and easy use of the thread. This class allows to perform background operations and publish results on the thread without having to manipulate threads and/or handlers.

Abstract
Package: asynctask
Copyright: 2015 Dmitry Mamontov d.slonyara@gmail.com
License: The BSD 3-Clause License
Author: Dmitry Mamontov d.slonyara@gmail.com
Version: Release: 1.0.3
Since: Class available since Release 1.0.3
Link: https://github.com/dmamontov/asynctask
Todo: Planned to write a method publishProgress
Located at AsyncTask.php

Methods summary

final public
# __construct( )

Creates a new asynchronous task

Creates a new asynchronous task

final public
# __destruct( )

Finish create an asynchronous task

Finish create an asynchronous task

final protected static mixed
# getProperty( string $key )

Returns the variable with the given key

Returns the variable with the given key

Parameters

$key

Returns

mixed
final protected static boolean
# setProperty( string $key, string $value )

Inserts or updates a variable with the given key

Inserts or updates a variable with the given key

Parameters

$key
$value

Returns

boolean
final public
# execute( mixed $parameters )

Executes the task with the specified parameters

Executes the task with the specified parameters

Parameters

$parameters
final public boolean
# cancel( )

Attempts to cancel execution of this task

Attempts to cancel execution of this task

Returns

boolean
final public string
# getStatus( )

Returns the current status of this task

Returns the current status of this task

Returns

string
final public boolean
# isCancelled( )

Returns true if this task was cancelled before it completed normally

Returns true if this task was cancelled before it completed normally

Returns

boolean
protected
# onPreExecute( )

Runs on the thread before doInBackground($parameters)

Runs on the thread before doInBackground($parameters)

abstract protected mixed
# doInBackground( mixed $parameters )

Override this method to perform a computation on a background thread

Override this method to perform a computation on a background thread

Parameters

$parameters

Returns

mixed
protected
# onPostExecute( mixed $result )

Runs on the thread after doInBackground($parameters)

Runs on the thread after doInBackground($parameters)

Parameters

$result
protected
# onCancelled( )

Runs on the thread after cancel()

Runs on the thread after cancel()

AsyncTask API documentation generated by ApiGen