XCRI-CAP PHP Parser Library v1.0-alpha1

This is an alpha release for discussion and feedback. It is likely to be buggy and/or incomplete. Please add bugs here on Launchpad and general discussion to the thread over at: http://www.xcri.org/forum/topic.php?id=78.

Milestone information

Project:
XCRI-CAP PHP Parser Library
Series:
trunk
Version:
v1.0-alpha1
Released:
 
Registrant:
Liam Green-Hughes
Release registered:
Active:
No. Drivers cannot target bugs and blueprints to this milestone.  

Download RDF metadata

Activities

Assigned to you:
No blueprints or bugs assigned to you.
Assignees:
No users assigned to blueprints and bugs.
Blueprints:
No blueprints are targeted to this milestone.
Bugs:
No bugs are targeted to this milestone.

Download files for this release

After you've downloaded a file, you can verify its authenticity using its MD5 sum or signature. (How do I verify a download?)

File Description Downloads
download icon libphp-xcri-cap-parser-v1.0-alpha1.tar.gz (md5, sig) XCRI-CAP Parser PHP Library 49
last downloaded 37 weeks ago
Total downloads: 49

Release notes 

This is an initial release for feedback and discussion. Some features may be incomplete or buggy.

TO test the library grab a copy of some XCRI-CAP data and use a code sample like this:
<?php
require_once("/path/to/libphp-xcri-cap-parser.php");

// buffer output for better performance
ob_start("ob_gzhandler");
// start document

echo "<html><body>";

// load the content of an XML file to a string variable

$xcricap_string = file_get_contents("/path/to/your/xcri-cap/data.xml");
// turn it into a SimpleXML object

$xcricap = simplexml_load_string($xcricap_string);
// get an instance of the parser

$xcri_cap_parser = new xcri_cap_parser();

// use it to extract the information

$catalog = $xcri_cap_parser->parse_xcri_cap($xcricap_string);
// print out the title of the catalogue (if more than one title show as a comma seperated list)

printf("<h1>%s</h1>", implode("," ,$catalog->get_title()));
// cycle through the providers

foreach ($catalog->get_provider() as $provider) {

  printf("<h2>%s</h2>", implode("," ,$provider->get_title()));

  echo "<ul>";
  // cycle through the courses and print as list items

  foreach ($provider->get_course() as $course) {

    printf("<li>%s %s</li>", implode("," ,$course->get_identifier()), implode("," ,$course->get_title()));

  }

  echo "</ul>";

}

echo "</body></html>";
// send page
ob_flush(); ?>

Changelog 

This release does not have a changelog.

0 blueprints and 0 bugs targeted

There are no feature specifications or bug tasks targeted to this milestone. The project's maintainer, driver, or bug supervisor can target specifications and bug tasks to this milestone to track the things that are expected to be completed for the release.

This milestone contains Public information
Everyone can see this information.