public function ReleaseInfo::get

8.0.x ReleaseInfo.php public ReleaseInfo::get($request, $refresh = FALSE)
7.x ReleaseInfo.php public ReleaseInfo::get($request, $refresh = FALSE)
master ReleaseInfo.php public ReleaseInfo::get($request, $refresh = FALSE)

Returns a project's release info from the update service.

Parameters

array $request: A request array.

bool $refresh: Whether to discard cached object.

Return value

\Drush\UpdateService\Project

2 calls to ReleaseInfo::get()
ReleaseInfo::checkProject in lib/Drush/UpdateService/ReleaseInfo.php
Check if a project is available in the update service.
ReleaseInfo::selectReleaseBasedOnStrategy in lib/Drush/UpdateService/ReleaseInfo.php
Select the most appropriate release for a project, based on a strategy.

File

lib/Drush/UpdateService/ReleaseInfo.php, line 62
Drush release info engine for update.drupal.org and compatible services.

Namespace

Drush\UpdateService

Class

ReleaseInfo
Release info engine class.

Code

public function get($request, $refresh = FALSE) {
  if ($refresh || !isset($this->cache[$request['name']])) {
    $project_release_info = Project::getInstance($request, $this->getCacheDuration());
    if ($project_release_info && !$project_release_info->isValid()) {
      $project_release_info = FALSE;
    }
    $this->cache[$request['name']] = $project_release_info;
  }
  return $this->cache[$request['name']];
}