1. Go to this page and download the library: Download rayne/wz2008-graph 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/ */
rayne / wz2008-graph example snippets
use Rayne\wz2008\Graph\Factory\WzClassificationFactory;
use Rayne\wz2008\Graph\WzClassificationInterface;
/**
* @var WzClassificationInterface $classification
*/
// Load the library's classification file …
$classification = WzClassificationFactory::build();
// … or load a custom classification file.
$classification = WzClassificationFactory::buildFromFile(
'WZ2008-2016-07-29-Classification_(complete).xml');
use Rayne\wz2008\Graph\WzClassificationInterface;
use Rayne\wz2008\Graph\WzItemInterface;
/**
* @var WzClassificationInterface $classification
* @var WzItemInterface $item
*/
$id = '26.20.0';
if ($classification->has($id)) {
$item = $classification->get($id);
}