Skip to content

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

License

Notifications You must be signed in to change notification settings

bamberjp/dmwsphp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DMWSPHP

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 [email protected]. Feel free to share how you are using this code in your own projects.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages