1. Go to this page and download the library: Download ggggino/warehouse-path library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
// Instantiate a place collector that contain the type of available places
$placesCollector = new PlacesCollector();
// optionally add the baseplace types (Location, Corridor, Wall)
$placesCollector->addBasePlaceTypes();
// Istantiate the Parser to prepare the places in an array
$wm = new MatrixParser($param, $placesCollector);
// Istantiate a customizable Breadcrumb buider
$breadcrumbBuilder = new BreadthFirstBreadcrumb($placesCollector);
$instance = new Warehouse($placesCollector, $wm, $breadcrumbBuilder);
$instance->setPlaces($wm->parse());
/** @var Place $nodeStart */
$nodeStart = $calculatedArray[4];
$warehouse->getPath($nodeStart);
/** @var Place[] $arrayNodes array of the places to touch */
$arrayNodes = [...]
$matrix = $warehouse->getMultiplePath($arrayNodes);
/** @var Place[] $arrayNodes array of the places to touch */
$arrayNodes = [...]
$arrayNodeSorted = $warehouse->calculate($arrayNodes, $matrix);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.