__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 setPackage(RootPackageInterface $package): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setPackage', [$package]); } public function getPackage(): RootPackageInterface { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getPackage', []); } public function setConfig(Config $config): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setConfig', [$config]); } public function getConfig(): Config { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getConfig', []); } public function setLoop(Loop $loop): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setLoop', [$loop]); } public function getLoop(): Loop { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getLoop', []); } public function setRepositoryManager(RepositoryManager $manager): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setRepositoryManager', [$manager]); } public function getRepositoryManager(): RepositoryManager { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getRepositoryManager', []); } public function setInstallationManager(InstallationManager $manager): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setInstallationManager', [$manager]); } public function getInstallationManager(): InstallationManager { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getInstallationManager', []); } public function setEventDispatcher(EventDispatcher $eventDispatcher): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setEventDispatcher', [$eventDispatcher]); } public function getEventDispatcher(): EventDispatcher { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'getEventDispatcher', []); } public function isGlobal(): bool { return \ShirabeRpcRuntime::callRust($this->__rhandle, 'isGlobal', []); } public function setGlobal(): void { \ShirabeRpcRuntime::callRust($this->__rhandle, 'setGlobal', []); } }