interface UpdateProcessorInterface (View source)

Processor of project update information.

Methods

bool|object
claimQueueItem()

Claims an item in the update fetch queue for processing.

fetchData()

Attempts to drain the queue of tasks for release history data to fetch.

createFetchTask(array $project)

Adds a task to the queue for fetching release history data for a project.

bool
processFetchTask(array $project)

Processes a task to fetch available update data for a single project.

int
numberOfQueueItems()

Retrieves the number of items in the update fetch queue.

deleteQueueItem(object $item)

Deletes a finished item from the update fetch queue.

Details

bool|object claimQueueItem()

Claims an item in the update fetch queue for processing.

Return Value

bool|object

On success we return an item object. If the queue is unable to claim an item it returns false.

See also

QueueInterface::claimItem

fetchData()

Attempts to drain the queue of tasks for release history data to fetch.

createFetchTask(array $project)

Adds a task to the queue for fetching release history data for a project.

We only create a new fetch task if there's no task already in the queue for this particular project (based on 'update_fetch_task' key-value collection).

Parameters

array $project

Associative array of information about a project as created by \Drupal\update\UpdateManager::getProjects(), including keys such as 'name' (short name), and the 'info' array with data from a .info.yml file for the project.

See also

UpdateManager::getProjects
update_get_available()
UpdateManager::refreshUpdateData
UpdateProcessor::fetchData
UpdateProcessor::processFetchTask

bool processFetchTask(array $project)

Processes a task to fetch available update data for a single project.

Once the release history XML data is downloaded, it is parsed and saved in an entry just for that project.

Parameters

array $project

Associative array of information about the project to fetch data for.

Return Value

bool

TRUE if we fetched parsable XML, otherwise FALSE.

int numberOfQueueItems()

Retrieves the number of items in the update fetch queue.

Return Value

int

An integer estimate of the number of items in the queue.

See also

QueueInterface::numberOfItems

deleteQueueItem(object $item)

Deletes a finished item from the update fetch queue.

Parameters

object $item

The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().

See also

QueueInterface::deleteItem