Runtime final class
Minn\Cli\Runtime · public/minn/src/Minn/Cli/Runtime.php · 80 lines
The engine, booted for a command: reads the site's wp-config.php (which ends in wp-settings.php, whose engine boot stops short of serving under WP-CLI) so the database constants and table prefix are known.
Constants and properties
| private | static ?self $shared | |
| private | static ?Minn\Runtime\Runtime $engine | |
| prop | readonly Minn\Db $db | Promoted from the constructor. |
| prop | readonly Minn\Content\Site $site | Promoted from the constructor. |
| prop | readonly Minn\Content\Users $users | Promoted from the constructor. |
| prop | readonly Minn\Auth\Capabilities $capabilities | Promoted from the constructor. |
| prop | readonly Minn\Front\Permalinks $permalinks | Promoted from the constructor. |
Public
| new | __construct(Minn\Db $db, Minn\Content\Site $site, Minn\Content\Users $users, Minn\Auth\Capabilities $capabilities, Minn\Front\Permalinks $permalinks)# | |
| static | boot(): self# | The engine's runtime for a CLI process, booted once. |
| static | bootEngine(): Minn\Runtime\Runtime# | The full WordPress runtime for a command, booted once: the facade is defined, the site's plugins load as code, and the lifecycle actions fire, so a verb can fire a scheduled hook whose callback a plugin registered. The lighter boot() does none of this; only a command that needs the runtime (cron) asks for this, since it loads every plugin. |
| static | standIn(): void# | The runtime for a command WP-CLI loads WordPress for: WP-CLI has already run wp-config.php, so the engine boots from the constants it defined, loads the site's plugins as code (their commands register as they load), and hands control back for WP-CLI to run the command. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | loadConfig(string $file): void# | wp-config.php sets $table_prefix as a variable; the engine reads it as a global. |
Nothing matches.