API / Minn\Cli / AssetUpdate

AssetUpdate final class

Minn\Cli\AssetUpdate · public/minn/src/Minn/Cli/AssetUpdate.php · 329 lines

Shared wording for `wp plugin update` and `wp theme update`. Captured from the reference: missing plugins warn and count as failed; a missing theme is a fatal Error and stops. json/csv print only the rows (empty stdout when nothing changed). `--exclude` always prints the skipped line in table/summary, even when the list is empty.

Constants and properties

privatereadonly string $kind

Promoted from the constructor.

privatereadonly Minn\Ops\Updates $updates

Promoted from the constructor.

privatereadonly Minn\Content\Inventory $inventory

Promoted from the constructor.

Public

new__construct(string $kind, Minn\Ops\Updates $updates, Minn\Content\Inventory $inventory)#
staticboot(string $kind): self#

The updater for one kind of asset, with the runtime up.

methodrun(array $names, array $assocArgs): void#

Updates the named assets, or all of them.

$nameslist<string>

Internals 13

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privateoffers(array $assocArgs): array#
$assocArgsarray<string, mixed>@return array<string, array<string, string>>
privatepreviewRow(array $offer): array#
$offerarray<string, string>@return array<string, string>
privateapply(array $offer, bool $quiet): ?array#
$offerarray<string, string>@return array<string, string>|null
privaterender(array $rows, array $assocArgs, string $format, bool $quiet, bool $dry, int $done, int $failed, int $total, ?array $exclude): void#
$rowslist<array<string, string>>
$assocArgsarray<string, mixed>
$excludelist<string>|null
privateemit(array $rows, array $assocArgs, string $format, bool $dry): void#
$rowslist<array<string, string>>@param array<string, mixed> $assocArgs
privateskipped(?array $exclude, bool $quiet): void#
$excludelist<string>|null
privatemissing(string $slug): void#
privateinstalled(string $slug): bool#
privatetitleFor(string $slug): string#
privatestatusByName(): array#
@return array<string, string>
privatechannel(string $from, string $to, array $assocArgs): bool#
$assocArgsarray<string, mixed>
privatesamePrefix(string $from, string $to, int $parts): bool#
privatepluginSlug(string $file): string#