bamberjp/dmwsphp

DMWS-PHP is a library that aims to simplify the use of the Digital Measures Web Services Platform for PHP Developers.

dev-master 2017-08-22 12:50 UTC

This package is not auto-updated.

Last update: 2024-04-28 00:16:15 UTC


README

DMWS-PHP is a library that aims to simplify the use of the Digital Measures Web Services Platform for PHP Developers. This project is currently under development and can not perform all operations available via the REST API.

Project sponsored by the Feliciano School of Business.

Dependencies

This library requires the Httful HTTP Client Library.

Getting Started

Setup Connection

$conn = new DMWSConnection("[USERNAME]", "[PASSWORD]");

or to use BETA Environment:

$conn = new DMWSConnection("[USERNAME]", "[PASSWORD]", false, true);

Examples

Get Schema Resources

try {
	$ListResource = $conn->getSchema();

	foreach($ListResource as $key => $SchemaResource) {
		print $SchemaResource->getText() . "<br>";
	}
} catch (Exception $e) {
	print $e;
}

Get Default Schema Resource

try {
	$SchemaResource = $conn->getDefaultSchema();
		
	print $SchemaResource->getText();
} catch (Exception $e) {
	print $e;
}

Schema Entity Resources

try {
	$SchemaEntityListResource = $conn->getDefaultSchema()->getSchemaEntities();
		
	foreach ($SchemaEntityListResource as $View) {
		$SchemeEntityResources = $View->getSchemaEntityResources();
		foreach ($SchemeEntityResources as $SchemaEntity) {
			print $SchemaEntity;
		}
	}
} catch (Exception $e) {
	print $e;
}

Schema Index Resources and Index Entries

try {
	$SchemaIndexResources = $conn->getDefaultSchema()->getSchemaIndices();
		
	foreach ($SchemaIndexResources as $SchemaIndexResource) {
		print $SchemaIndexResource;
		foreach ($SchemaIndexResource->getIndexEntries() as $IndexEntry) {
			print $IndexEntry;
		}
	}
} catch (Exception $e) {
	print $e;
}

PCI

try {
	$SchemaResource = $conn->getDefaultSchema();
	$PCIRecords = $conn->getPCI($SchemaResource);
	foreach($PCIRecords as $Record) {
		print $Record . "<br>";
	}
} catch (Exception $e) {
	print $e;
}

INTELLCONT

try {
	$SchemaResource = $conn->getDefaultSchema();
		
	$INTELLCONTRecords = $conn->getINTELLCONT($SchemaResource);
	foreach($INTELLCONTRecords as $Record) {
		print $Record . "<br>";
			
		$Authors = $Record->getAuthors();
		foreach ($Authors as $Author) {
			print $Author;
		}
	}
} catch (Exception $e) {
	print $e;
}

Changelog

08.22.2017 Removed bad argument in function getINTELLCONT() in DMWSConnection.

Support

Contact me directly via email for support at bamberjp@gmail.com. Feel free to share how you are using this code in your own projects.