UpdateFetcher
class UpdateFetcher implements UpdateFetcherInterface (View source)
Fetches project information from remote locations.
Traits
Provides dependency injection friendly methods for serialization.
Constants
| UPDATE_DEFAULT_URL |
URL to check for updates, if a given project doesn't define its own. |
Properties
| protected array | $_serviceIds | An array of service IDs keyed by property name used for serialization. |
from DependencySerializationTrait |
| protected array | $_entityStorages | An array of entity type IDs keyed by the property name of their storages. |
from DependencySerializationTrait |
| protected string | $fetchUrl | The fetch url configured in the update settings. |
|
| protected Config | $updateSettings | The update settings |
|
| protected ClientInterface | $httpClient | The HTTP client to fetch the feed data with. |
Methods
Constructs a UpdateFetcher.
Retrieves the project information.
Generates the URL to fetch information about project updates.
Returns the base of the URL to fetch available update data for a project.
Details
__sleep()
{@inheritdoc}
__wakeup()
{@inheritdoc}
__construct(ConfigFactoryInterface $config_factory, ClientInterface $http_client)
Constructs a UpdateFetcher.
string
fetchProjectData(array $project, string $site_key = '')
Retrieves the project information.
string
buildFetchUrl(array $project, string $site_key = '')
Generates the URL to fetch information about project updates.
This figures out the right URL to use, based on the project's .info.yml file and the global defaults. Appends optional query arguments when the site is configured to report usage stats.
string
getFetchBaseUrl(array $project)
Returns the base of the URL to fetch available update data for a project.