protected function processBlocktrailPubKeys() {
        if (!isset($this->backupInfo['blocktrail_public_keys'])) {
            return;
        }

        //create QR codes for each blocktrail pub key
        foreach ($this->backupInfo['blocktrail_public_keys'] as $keyIndex => $key) {
            $key = $key instanceof BIP32Key ? $key : BIP32Key::create(HierarchicalKeyFactory::fromExtended($key[0]), $key[1]);

            $qrCode = new QrCode();
            $qrCode
                ->setText($key->key()->toExtendedKey())
                ->setSize(self::QR_CODE_SIZE-20)
                ->setPadding(10)
                ->setErrorCorrection('high')
                ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))
                ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))
                ->setLabel("KeyIndex: ".$keyIndex."    Path: ".$key->path())
                ->setLabelFontSize(10)
            ;
            $this->blocktrailPubKeyQRs[] = array(
                'keyIndex'  => $keyIndex,
                'path'      => $key->path(),
                'qr'        => $qrCode->getDataUri(),
                'qrImg'     => $qrCode->getImage(),
            );
        }
    }
protected function processBlocktrailPubKeys() {
        if (!isset($this->backupInfo['blocktrail_public_keys'])) {
            return;
        }

        //create QR codes for each blocktrail pub key
        foreach ($this->backupInfo['blocktrail_public_keys'] as $keyIndex => $key) {
            $key = $key instanceof BIP32Key ? $key : BIP32Key::create(HierarchicalKeyFactory::fromExtended($key[0]), $key[1]);

            $qrCode = new QrCode();
            $qrCode
                ->setText($key->key()->toExtendedKey())
                ->setSize(self::QR_CODE_SIZE-20)
                ->setPadding(10)
                ->setErrorCorrection('high')
                ->setForegroundColor(array('r' => 0, 'g' => 0, 'b' => 0, 'a' => 0))
                ->setBackgroundColor(array('r' => 255, 'g' => 255, 'b' => 255, 'a' => 0))
                ->setLabel("KeyIndex: ".$keyIndex."    Path: ".$key->path())
                ->setLabelFontSize(10)
            ;
            $this->blocktrailPubKeyQRs[] = array(
                'keyIndex'  => $keyIndex,
                'path'      => $key->path(),
                'qr'        => $qrCode->getDataUri(),
                'qrImg'     => $qrCode->getImage(),
            );
        }
    }
protected function processBlocktrailPubKeys ( ) { if ( ! isset ( $ this -> backupInfo [ 'blocktrail_public_keys' ] ) ) { return ; } //create QR codes for each blocktrail pub key foreach ( $ this -> backupInfo [ 'blocktrail_public_keys' ] as $ keyIndex => $ key ) { $ key = $ key instanceof BIP32Key ? $ key : BIP32Key :: create ( HierarchicalKeyFactory :: fromExtended ( $ key [ 0 ] ) , $ key [ 1 ] ) ; $ qrCode = new QrCode ( ) ; $ qrCode -> setText ( $ key -> key ( ) -> toExtendedKey ( ) ) -> setSize ( self :: QR_CODE_SIZE - 20 ) -> setPadding ( 10 ) -> setErrorCorrection ( 'high' ) -> setForegroundColor ( array ( 'r' => 0 , 'g' => 0 , 'b' => 0 , 'a' => 0 ) ) -> setBackgroundColor ( array ( 'r' => 255 , 'g' => 255 , 'b' => 255 , 'a' => 0 ) ) -> setLabel ( "KeyIndex: " . $ keyIndex . "    Path: " . $ key -> path ( ) ) -> setLabelFontSize ( 10 ) ; $ this -> blocktrailPubKeyQRs [ ] = array ( 'keyIndex' => $ keyIndex , 'path' => $ key -> path ( ) , 'qr' => $ qrCode -> getDataUri ( ) , 'qrImg' => $ qrCode -> getImage ( ) , ) ; } }
process the blocktrail public keys and create qr codes for each one
process the blocktrail public keys and create qr codes for each one