PHP code example of kennisnet / edurepsearch

1. Go to this page and download the library: Download kennisnet/edurepsearch 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/ */

    

kennisnet / edurepsearch example snippets


$strategy = new \Kennisnet\Edurep\EdurepStrategyType();
$config = new \Kennisnet\Edurep\DefaultSearchConfig($strategy, "https://wszoeken.edurep.kennisnet.nl/");
$edurep = new \Kennisnet\Edurep\EdurepSearch($config);

$edurep
    # set search terms
    # should be provided urldecoded, the class will encode it
    ->setQuery("math")

    # set another default record schema
    # default lom
    ->setRecordSchema("oai_dc")

    # set to return drilldowns, default none
    ->setXtermDrilldown("lom.technical.format:5,lom.rights.cost:2")

    # set to return an additional recordschema
    # can be called multiple times
    ->addXRecordSchema("smbAggregatedData")
;

# perform a search for lom records
$response = $edurep->search('lom');

print $edurep->getRequestUrl();

print $response;