Giter VIP home page Giter VIP logo

webdl's Introduction

WebDL

WebDL (Web Data Link) - Work with disparate data sources, like API's, Databases, and Files, as if they were one source.

Example Usage - RESTful

After installing the PHP and setting up the WebDL database, start accessing records using the following format.

http://domain.com/rest/account/id/1

Equivalent ways to make the same call:
http://domain.com/webdl.php/rest/account/id/1
http://domain.com/webdl.php/account/id/1
http://domain.com/account/id/1

rest tells the url parser that you are accessing the RESTful interface. Technically the rest can be left out, as it's the default controller, but if you plan on setting up other interfaces like SOAP, etc. then it's likely best to call it with the rest in your projects.

account specifies the record type you want returned.

id specifies the record column to filter on.

1 gives the value to match the specified column by.

Example Usage - PHP

The following is an example for retrieving a record from within a PHP application.

<?php
  // Tell WebDL where it has been installed in relation to this file.
  define('WEBDL_ABSPATH', dirname(__FILE__).'/');
  // Initialize WebDL.
  require_once(WEBDL_ABSPATH.'webdl/setup/init.php');

  // Create a record object of type account.
  $record = new WebDLMRecord('account');
  // Specify what to match on.
  $record->push_match('id', 1);

  // Process the record with the WebDLMController
  // The controller figures out what data sources need to be called, calls each, and joins the data, returning the result.
  $result = WebDLMController::dlm_record($record);
  
  // Echo the data
  echo $result->get_joined_data();
?>

webdl's People

Contributors

sirhanshafahath avatar spencerlambert avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.