37 lines
867 B
PHP
37 lines
867 B
PHP
<?php
|
|
|
|
namespace App\Services\BundleUpdaters\Contracts;
|
|
|
|
use App\Classes\Bundle;
|
|
|
|
interface UpdatesBundle
|
|
{
|
|
/**
|
|
* Return a boolean value indicating if the updater can actually make the
|
|
* update using known data.
|
|
*/
|
|
public function canUpdateBundle(): bool;
|
|
|
|
/**
|
|
* Return an array describing what kind of data the updater needs in
|
|
* addition to the one it already has
|
|
*/
|
|
public function formSpecs(): ?array;
|
|
|
|
/**
|
|
* Updates bundle's extended metadata
|
|
*/
|
|
public function update();
|
|
|
|
/**
|
|
* Return a boolean value indicating if this updater in particular can
|
|
* update specified bundle
|
|
*/
|
|
public static function handles(Bundle $bundle): bool;
|
|
|
|
/**
|
|
* Return an instance of the updater for specified bundle
|
|
*/
|
|
public static function make(Bundle $bundle): UpdatesBundle;
|
|
}
|