public function modifyQuery(DpleQuery &$query)
 {
     global $wgDpleMaxCost;
     /** Throw an exception if there is no WHERE clause. */
     if (!$query->getConds()) {
         throw new Scribunto_LuaError(wfMessage('dple-error-no-criteria')->text());
     }
     /** Sum up the total cost. */
     $this->totalCost_ = 0;
     foreach ($this->getFeatures() as $feature) {
         $this->totalCost_ += $feature->getCost();
     }
     /** Throw an exception if @ref $totalCost_ exceeds @ref
      *	$wgDpleMaxCost#. */
     if ($this->totalCost_ > $wgDpleMaxCost) {
         throw new Scribunto_LuaError(wfMessage('dple-error-too-expensive', $this->totalCost_, $wgDpleMaxCost)->text());
     }
 }