price * .95), 2); } } // create a client instance $client = new Solarium_Client($config); // get a select query instance $query = $client->createSelect(); // set the custom resultclass $query->setDocumentClass('myDoc'); // this executes the query and returns the result $resultset = $client->select($query); // display the total number of documents found by solr echo 'NumFound: '.$resultset->getNumFound(); // show documents using the resultset iterator foreach ($resultset as $document) { echo '
'; echo ''; echo ''; echo ''; // this method is added by the custom class echo ''; echo '
id' . $document->id . '
name' . $document->name . '
price' . $document->price . '
offer price' . $document->getSpecialPrice() . '
'; } htmlFooter();