/** * Returns sum of all documents published before the $thresholdYear. */ public function getNumDocsUntil($thresholdYear) { $finder = new Opus_DocumentFinder(); $finder->setServerState('published'); $finder->setServerDatePublishedBefore($thresholdYear + 1); return $finder->count(); }