My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages
Links

GoodRelations for PHP (GR4PHP)

GR4PHP is a PHP API (as library) that allows the consumption of GoodRelations data on an eligible SPARQL endpoint without expecting the developer to have deeper understanding of the underlying GoodRelations vocabulary or SPARQL queries. The API provides six abstract functions, which are interally translated into proper SPARQL queries for GoodRelations.

  • getCompany: Returns information about a GoodRelations BusinessEntity.
  • getLocation: Return stores in the proximity of a given geographic point.
  • getOffers: Returns GoodRelations Offerings given search criteria.
  • getOpeningHours: Gives opening hours to a given store (GoodRelations LocationOfSalesOrServiceProvisioning).
  • getProductModel: Returns details about model data (GoodRelations ProductOrServiceModel).
  • getStore: Gives response data to a SPARQL query searching for GoodRelations LocationOfSalesOrServiceProvisioning.

Take a closer look at this page for an entire view on input and output parameters of the available functions.

Benefits of GR4PHP

PHP developers do not have to deal with the full details of GoodRelations, RDF, or SPARQL and can easily integrate GoodRelations e-commerce data, like offers, product features, or store information into their Web applications.

Demo and Documentation

For demo and documentation take a look at

How to start developing with GR4PHP

After downloading and including the GR4PHP package (for more information, please check our QuickStartGuide) into your project directory, you can pick one of the GR4PHP libary functions (see the list above). GR4PHP automatically crafts a SPARQL query for you, submits it to the configured SPARQL endpoint, fetches the results and converts them into a PHP array, on which further processing can be conducted.

The figure below sketches a flow chart of GR4PHP:

Powered by Google Project Hosting