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:----OmRHRNFtU/g21QuZl29y2+LFm/uHai98/L1mZ3gUi+PfR4wC6BcdVcTESe+RB31gDx/nkz7CQGTkqH/vQMGr3P9zAMlQLhImTzuPeSEskZQ/t/dsZJYKhW3ZB+Lxz4ACNSKJ+yzjvlxtYVW+8ykPPyuL5I0SPjnE+Ublb58Ewf/PILotGFfbGlwjxLUNfe3Yo4KQgfnDA+6sy0EZzD/NeHKUmcIVTpn1uU4Cvkh3Lpx7cS2puWN7jx/ujnIPLRmYnneLT+SsrE+jpeQLxlLLlUOzfMVafHEcAdQmwzE03WwfpVBtUPTb3b+39Uk8igqtJmHK3CBC1E5O1+V6vsox8N5kvuuPX9smtQsiXB+1Omt4iOApMdJ41+Pe+UZLmOcuGyAlCVTb8XI3qcsyUb0v8T6pArh9otf0frIeMC3FeU0ohMs8AlEY0f7CFDIrG6KoAIJ0RPfTXCq6oZJTs9AENZeBVorMBjVRiHhhvSWyepkMFB0RW3AkUR5CmAtvVpqRKlQI3G1oSpuKfp02eA1suJfwLvvb8uOi9hZLlQEu26J0ivV4IJQ4zUhbdnZoOa5Hh5QU0xk0LhtDA5b4obBGYITlIIBDEA5FACE/+IhedC4MYcyKHxk3ceeNx6llK6erTjKEPg55xeTWlZMFUP/jAVxJ+S0thDq3M0HJH6FepfY=----ATTACHMENT:----NDI1Nzk0MzkwMTI3NjExNyA4NzUyMDYyNTkyMDY4MTUyIDk1OTQ3NjAyNzU2MDk2MjU=