Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Highly experimental class to read and 'execute' REST methods described by WADL. Currently has a minor Drupal integration bit, and barely tested with the Fedora WADL.

Notifications You must be signed in to change notification settings

adam-vessey/PHP_WADL_parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP_WADL_parser

A highly experimental class to read and ‘execute’ REST methods described by WADL. Currently has a minor Drupal integration bit, and barely tested with the Fedora WADL. This was mostly just written because I knew it could be, and wouldn’t be too long of a task.

Usage

The WADL_REST class (defined in WADL_REST.inc) needs to be instantiated with an associative array of parameters, containing at least the ‘wadl_url’, which is where the WADL XML file is pulled from (using curl). It also accepts ‘username’ and ‘password’, which are by default specified any time a curl call is made.

After instantiation, the REST ‘functions’ can then be called against the instantiated WADL_REST object. For example:


  <?php
    //Instantiate the WADL_REST, giving the location of the WADL XML file to load.
    $api = new WADL_REST(array(
      'wadl_url' => 'http://some-host/and/wadl/file/path',
    ));
    
    //Let's say the WADL defines a function helloWorld.  We can then call it like:
    echo $api->helloWorld();
  ?>

This would likely be expected to yield something like:

  Hello world!

About

Highly experimental class to read and 'execute' REST methods described by WADL. Currently has a minor Drupal integration bit, and barely tested with the Fedora WADL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages