__rhandle = $rhandle; $this->__epoch = $epoch; } public function __destruct() { \ShirabeRustObjectRegistry::release($this->__rhandle); } public function __shirabeRustHandleDescriptor(): array { return [ '__rhandle' => $this->__rhandle, '__class' => static::class, '__epoch' => $this->__epoch, ]; } public function __clone() { // PHP has already shallow-copied this stub, so both copies would point at one // entity and release it twice. The Rust side clones the entity instead, applying // whatever __clone semantics the real class defines, and this copy rebinds to the // fresh handle. Entities without clone semantics answer with an explicit error. [$this->__rhandle, $this->__epoch] = \ShirabeRpcRuntime::callRust($this->__rhandle, '__shirabeClone', []); \ShirabeRustObjectRegistry::adopt($this->__rhandle, $this); } public function __construct() { [$this->__rhandle, $this->__epoch] = \ShirabeRpcRuntime::callRust(0, '__shirabeConstruct', [static::class, []]); \ShirabeRustObjectRegistry::adopt($this->__rhandle, $this); } public function isInteractive() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isInteractive', []); } public function isVerbose() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isVerbose', []); } public function isVeryVerbose() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isVeryVerbose', []); } public function isDebug() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isDebug', []); } public function isDecorated() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isDecorated', []); } public function write($messages, bool $newline = true, int $verbosity = self::NORMAL) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'write', [$messages, $newline, $verbosity]); } public function writeError($messages, bool $newline = true, int $verbosity = self::NORMAL) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'writeError', [$messages, $newline, $verbosity]); } public function writeRaw($messages, bool $newline = true, int $verbosity = self::NORMAL) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'writeRaw', [$messages, $newline, $verbosity]); } public function writeErrorRaw($messages, bool $newline = true, int $verbosity = self::NORMAL) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'writeErrorRaw', [$messages, $newline, $verbosity]); } public function overwrite($messages, bool $newline = true, ?int $size = null, int $verbosity = self::NORMAL) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'overwrite', [$messages, $newline, $size, $verbosity]); } public function overwriteError($messages, bool $newline = true, ?int $size = null, int $verbosity = self::NORMAL) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'overwriteError', [$messages, $newline, $size, $verbosity]); } public function ask(string $question, $default = null) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'ask', [$question, $default]); } public function askConfirmation(string $question, bool $default = true) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'askConfirmation', [$question, $default]); } public function askAndValidate(string $question, callable $validator, ?int $attempts = null, $default = null) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'askAndValidate', [$question, $validator, $attempts, $default]); } public function askAndHideAnswer(string $question) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'askAndHideAnswer', [$question]); } public function select(string $question, array $choices, $default, $attempts = false, string $errorMessage = 'Value "%s" is invalid', bool $multiselect = false) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'select', [$question, $choices, $default, $attempts, $errorMessage, $multiselect]); } public function getAuthentications() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getAuthentications', []); } public function hasAuthentication($repositoryName) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'hasAuthentication', [$repositoryName]); } public function getAuthentication($repositoryName) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getAuthentication', [$repositoryName]); } public function setAuthentication($repositoryName, $username, $password = null) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'setAuthentication', [$repositoryName, $username, $password]); } public function loadConfiguration(Config $config) { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'loadConfiguration', [$config]); } public function emergency($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'emergency', [$message, $context]); } public function alert($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'alert', [$message, $context]); } public function critical($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'critical', [$message, $context]); } public function error($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'error', [$message, $context]); } public function warning($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'warning', [$message, $context]); } public function notice($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'notice', [$message, $context]); } public function info($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'info', [$message, $context]); } public function debug($message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'debug', [$message, $context]); } public function log($level, $message, array $context = []): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'log', [$level, $message, $context]); } public function resetAuthentications() { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'resetAuthentications', []); } }