1. Go to this page and download the library: Download gdbots/ncr library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
$node1 = $cache->getNode($nodeRef);
$node2 = $cache->getNode($nodeRef);
$node->equals($node2); // returns true if their data is the same
publicfunctiononSearchNodesResponse(ResponseCreatedEvent $pbjxEvent): void{
$response = $pbjxEvent->getResponse();
if (!$response->has('nodes')) {
return;
}
// for all nodes in this search response, mark the creator// and updater for lazy load. if they get requested at some point// in the current request, it will be batched for optimal performance$this->lazyLoader->addEmbeddedNodeRefs($response->get('nodes'), [
'creator_ref' => 'acme:user',
'updater_ref' => 'acme:user',
]);
}