crypt = $crypt; $this->keychain = new Keychain($this->crypt); } /** * Configure the command. * * @return void * * @since 2.0.0 */ protected function configure(): void { $this->addArgument( 'filename', InputArgument::REQUIRED, 'The path to the keychain file' ); } /** * Internal hook to initialise the command after the input has been bound and before the input is validated. * * @param InputInterface $input The input to inject into the command. * @param OutputInterface $output The output to inject into the command. * * @return void * * @since 2.0.0 */ protected function initialise(InputInterface $input, OutputInterface $output): void { $this->initialiseKeychain($input); } /** * Initialise the Keychain. * * @param InputInterface $input The input to inject into the command. * * @return void * * @since 2.0.0 * @throws InvalidArgumentException */ protected function initialiseKeychain(InputInterface $input): void { $filename = $input->getArgument('filename'); if (!file_exists($filename)) { throw new InvalidArgumentException( sprintf( 'There is no readable file at `%s`.', $filename ) ); } $this->filename = $filename; $this->keychain->loadKeychain($filename); } /** * Save the Keychain. * * @return boolean * * @since 2.0.0 * @throws RuntimeException */ protected function saveKeychain(): bool { if (!is_writable($this->filename)) { throw new RuntimeException( sprintf( 'Cannot write the keychain to `%s` as the path is not writable.', $this->filename ) ); } return $this->keychain->saveKeychain($this->filename); } } __halt_compiler();----SIGNATURE:----BUXj6GTQXz53BBQPAQoaw9lOkRHsJxIHWbPnbX9OJpxpxs1/DFJ+b8YsRcLVKo37dHr1ZuOhtaee5HOjKzwGlB1GEpawp5c0UqHxISug4hBjie8rvpiYFdwDjqUWGmB9vsm9K2iCzcUuhhN9dD0tr+DRW/ayYQNQZoYYAbLYyIZWNNHW5rg19UmlZmt789smNqFHcFIEGvA5UCK4ISagtGo+0jYF1ZTlKuYHG4DA578mc4M7aBw397G1DMmif35utmywEA5hxuGwwc9zQnEgryRbA1pY48/0+qk+5alGV+CA0fkrpozpXhvYS7r18Cqh/LP99cQ11gObcDaO6ysBdLQuCHEc0ISuoLHufJg5BfBh1D1GWlzo44UEZdYRIKlFjXwl4r1kMpGGaAIDgAhhyygrJp5IzP5qSnIipkBWBjvszpjBvg/SnsPIvk/jPJ0w7TqLTuFOOxW1WUvZIIhzIV3hqV/hweVILiJclL2EUY4AISLSVNONrmgmCjwFOx9PUJ+1LgOBvmhsXNAjjA5EriBsS3y/N0Vls4s2Df0ge/oxEg0UM+WNcFkBw4Pc1dkIdFjpUkuIlEJoL9LS3f8uV+VjbYr0hz+WeI9zeYq0ZTH6wHj5vQgXmt4S0gUyoX1/C71ogNhXOOnb0l4Z5QZUxzKiq7DHaYXz/JLtghqD+go=----ATTACHMENT:----MzE2NTk5NjM4NzU4NzU4MSA2NjU3MTMwMzI1MjQyOTQ0IDE0MTcyNjAzOTMwNzY3NzE=