1. Go to this page and download the library: Download devgroup/bh 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/ */
devgroup / bh example snippets
$bh = new \BEM\BH();
// ...
// manual installation
/ ...
return function ($bh) {
$bh->match(/*...*/);
// ...
};
// Instantiate BH object
$bh = new \BEM\BH();
// Load and apply matchers to BH object in $bh
$fn =
$bh1 = new \BEM\BH();
$bh2 = new \BEM\BH();
// load matchers
$indexMatchers = exMatchers($bh1); // bh1 now contains matchers for index page only
$mergedMatchers($bh2); // bh2 now contains all matchers
// use it with the same bemjson data
$bh1->apply($bemjson);
$bh2->apply($bemjson);