PHP Класс AsyncTask

Автор: Dmitry Mamontov ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( ) : void Creates a new asynchronous task
__destruct ( ) : void Finish create an asynchronous task
cancel ( ) : boolean Attempts to cancel execution of this task
execute ( mixed $parameters ) : void Executes the task with the specified parameters
getStatus ( ) : string Returns the current status of this task
isCancelled ( ) : boolean Returns true if this task was cancelled before it completed normally

Защищенные методы

Метод Описание
doInBackground ( mixed $parameters ) : mixed Override this method to perform a computation on a background thread
getProperty ( string $key ) : mixed Returns the variable with the given key
onCancelled ( ) : void Runs on the thread after cancel()
onPostExecute ( mixed $result ) : void Runs on the thread after doInBackground($parameters)
onPreExecute ( ) : void Runs on the thread before doInBackground($parameters)
setProperty ( string $key, string $value ) : boolean Inserts or updates a variable with the given key

Приватные методы

Метод Описание
getUid ( string $key ) : integer Returns a unique integer identifier for a given key

Описание методов

__construct() закрытый публичный Метод

Creates a new asynchronous task
final public __construct ( ) : void
Результат void

__destruct() закрытый публичный Метод

Finish create an asynchronous task
final public __destruct ( ) : void
Результат void

cancel() закрытый публичный Метод

Attempts to cancel execution of this task
final public cancel ( ) : boolean
Результат boolean

doInBackground() абстрактный защищенный Метод

Override this method to perform a computation on a background thread
abstract protected doInBackground ( mixed $parameters ) : mixed
$parameters mixed
Результат mixed

execute() закрытый публичный Метод

Executes the task with the specified parameters
final public execute ( mixed $parameters ) : void
$parameters mixed
Результат void

getProperty() закрытый защищенный статический Метод

Returns the variable with the given key
final protected static getProperty ( string $key ) : mixed
$key string
Результат mixed

getStatus() закрытый публичный Метод

Returns the current status of this task
final public getStatus ( ) : string
Результат string

isCancelled() закрытый публичный Метод

Returns true if this task was cancelled before it completed normally
final public isCancelled ( ) : boolean
Результат boolean

onCancelled() защищенный Метод

Runs on the thread after cancel()
protected onCancelled ( ) : void
Результат void

onPostExecute() защищенный Метод

Runs on the thread after doInBackground($parameters)
protected onPostExecute ( mixed $result ) : void
$result mixed
Результат void

onPreExecute() защищенный Метод

Runs on the thread before doInBackground($parameters)
protected onPreExecute ( ) : void
Результат void

setProperty() закрытый защищенный статический Метод

Inserts or updates a variable with the given key
final protected static setProperty ( string $key, string $value ) : boolean
$key string
$value string
Результат boolean