Happpi PHP Library

getPart()

Retrieves a part object.

Return Type

CurtPart

Required Parameters

Optional Parameters

    getPart(float $year, string $make, string $model, string $style)

Dependencies

    $part->setPartID(value)
    Optional:$part->setVehicleID(int $value)

Example:

<!-- getPart() -->
<?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>Part information for 11000</h2>";
	$Part->setPartID(11000); // set required dependency of partID in order to get related parts.
	$currentPart = $Part->getPart(); // use getPart method get the part specified by the dependency above.

	echo $currentPart->getShortDesc();
?>