Happpi PHP Library

getAllParts()

Retrieves all CURT parts given a status code.

Return Type

Array of type: CurtPart

Required Parameters

    getAllParts(string $status)

Optional Parameters

    None

Dependencies

    None

Example:


<!-- getAllParts() -->
<?php
	require_once('libraries/happpi/LoadAll.php'); // points to the LoadAll.php file for loading the library.

	// once the library is required, you can now use one of the main "interaction" classes.
	// These interaction classes contain methods that get information from our REST API and
	// converts them to PHP objects for you to use.
	$Part = new CurtPart(); // create new part object to gain access to its functions.

	echo "<h2>All Parts Given a Certain Status Code: 900</h2>";
	$listofAllParts = $Part->getAllParts(900); // use getAllParts given a status code of 900
	foreach($listofAllParts as $part){ // step through the list of part ID's (integers)
		echo $part->getShortDesc(); // display each part's shortDesc property using the getter.
		echo "<br />";
	}
?>