public function installFoxxZip($localZip, $mountPoint, array $options = [])
    {
        if (!file_exists($localZip)) {
            throw new ClientException("Foxx-Zip {$localZip} does not exist (or file is unreadable).");
        }

        try {
            $post     = file_get_contents($localZip);
            $response = $this->getConnection()->post(Urls::URL_UPLOAD, $post);

            if ($response->getHttpCode() < 400) {
                $response = $this->getConnection()->put(Urls::URL_FOXX_INSTALL, json_encode(['appInfo' => $response->getJson()['filename'], 'mount' => $mountPoint]));
                if ($response->getHttpCode() < 400) {
                    return $response->getJson();
                }

                throw new ClientException('Foxx-Zip install failed');
            }

            throw new ClientException('Foxx-Zip upload failed');
        } catch (ServerException $e) {
            throw new ClientException($e->getMessage());
        }
    }
public function installFoxxZip($localZip, $mountPoint, array $options = [])
    {
        if (!file_exists($localZip)) {
            throw new ClientException("Foxx-Zip {$localZip} does not exist (or file is unreadable).");
        }

        try {
            $post     = file_get_contents($localZip);
            $response = $this->getConnection()->post(Urls::URL_UPLOAD, $post);

            if ($response->getHttpCode() < 400) {
                $response = $this->getConnection()->put(Urls::URL_FOXX_INSTALL, json_encode(['appInfo' => $response->getJson()['filename'], 'mount' => $mountPoint]));
                if ($response->getHttpCode() < 400) {
                    return $response->getJson();
                }

                throw new ClientException('Foxx-Zip install failed');
            }

            throw new ClientException('Foxx-Zip upload failed');
        } catch (ServerException $e) {
            throw new ClientException($e->getMessage());
        }
    }
public function installFoxxZip ( $ localZip , $ mountPoint , array $ options = [ ] ) { if ( ! file_exists ( $ localZip ) ) { throw new ClientException ( "Foxx-Zip {$localZip} does not exist (or file is unreadable)." ) ; } try { $ post = file_get_contents ( $ localZip ) ; $ response = $ this -> getConnection ( ) -> post ( Urls :: URL_UPLOAD , $ post ) ; if ( $ response -> getHttpCode ( ) < 400 ) { $ response = $ this -> getConnection ( ) -> put ( Urls :: URL_FOXX_INSTALL , json_encode ( [ 'appInfo' => $ response -> getJson ( ) [ 'filename' ] , 'mount' => $ mountPoint ] ) ) ; if ( $ response -> getHttpCode ( ) < 400 ) { return $ response -> getJson ( ) ; } throw new ClientException ( 'Foxx-Zip install failed' ) ; } throw new ClientException ( 'Foxx-Zip upload failed' ) ; } catch ( ServerException $ e ) { throw new ClientException ( $ e -> getMessage ( ) ) ; } }
Upload and install a foxx app.

@throws ClientException

@param string $localZip   - the path to the local foxx-app zip-archive to upload/install
@param string $mountPoint - the mount-point for the app, must begin with a '/'
@param array  $options    - for future usage

@return array - the server response

@SuppressWarnings(PHPMD.UnusedFormalParameter)
Upload and install a foxx app .