Download the PHP package clue/viewvc-api-react without Composer

On this page you can find all versions of the php package clue/viewvc-api-react. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package viewvc-api-react

clue/viewvc-api-react Build Status

Simple, async API-like access to your ViewVC web interface (Subversion/CVS browser), built on top of React PHP.

Table of Contents

Quickstart example

Once installed, you can use the following code to fetch a directory listing from the given ViewVC URL:

See also the examples.

Usage

Client

The Client is responsible for assembling and sending HTTP requests to the remote ViewVC web interface. It requires a Browser object bound to the main EventLoop in order to handle async requests:

The Client API uses relative URIs to reference files and directories in your ViewVC installation, so make sure to apply the base URI as depicted above.

If you need custom DNS or proxy settings, you can explicitly pass a custom Browser instance.

Actions

ViewVC does not officially expose an API. However, its REST-like URLs make it easy to construct the right requests and scrape the results from its HTML output. All public methods resemble these respective actions otherwise available in the ViewVC web interface.

All actions support async operation by returning promises.

Listing all available actions is out of scope here, please refer to the class outline.

Promises

Sending requests is async (non-blocking), so you can actually send multiple requests in parallel. ViewVC will respond to each request with a response message, the order is not guaranteed. Sending requests uses a Promise-based interface that makes it easy to react to when a request is fulfilled (i.e. either successfully resolved or rejected with an error).

If this looks strange to you, you can also use the more traditional blocking API.

Blocking

As stated above, this library provides you a powerful, async API by default.

If, however, you want to integrate this into your traditional, blocking environment, you should look into also using clue/block-react.

The resulting blocking code could look something like this:

Refer to clue/block-react for more details.

Streaming

The following API endpoint resolves with the file contents as a string:

`

Keep in mind that this means the whole string has to be kept in memory. This is easy to get started and works reasonably well for smaller files.

For bigger files it's usually a better idea to use a streaming approach, where only small chunks have to be kept in memory. This works for (any number of) files of arbitrary sizes.

The following API endpoint complements the default Promise-based API and returns an instance implementing ReadableStreamInterface instead:

Install

The recommended way to install this library is through Composer. New to Composer?

This will install the latest supported version:

See also the CHANGELOG for details about version upgrades.

License

MIT


All versions of viewvc-api-react with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
react/event-loop Version ~0.4.0|~0.3.0
react/promise Version ~2.1|~1.1
clue/buzz-react Version ^0.5
ext-simplexml Version *
neitanod/forceutf8 Version ~1.4
rize/uri-template Version ^0.3
clue/promise-stream-react Version ^0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clue/viewvc-api-react contains the following files

Loading the files please wait ....