1
0
cms11/app/Services/BundleUpdaters/Contracts/UpdatesBundle.php

37 lines
867 B
PHP
Raw Normal View History

<?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;
}