/** * @since 2.2 * * {@inheritDoc} */ public function interpretDescription(Description $description) { $joinVariable = $this->compoundConditionBuilder->getJoinVariable(); $orderByProperty = $this->compoundConditionBuilder->getOrderByProperty(); $conceptDescription = $this->getConceptDescription($description->getConcept()); if ($conceptDescription === '') { return new FalseCondition(); } $hash = 'concept-' . $conceptDescription->getQueryString(); $this->compoundConditionBuilder->getCircularReferenceGuard()->mark($hash); if ($this->compoundConditionBuilder->getCircularReferenceGuard()->isCircularByRecursionFor($hash)) { $this->compoundConditionBuilder->addError(wfMessage('smw-query-condition-circular', $conceptDescription->getQueryString())->text()); return new FalseCondition(); } $this->compoundConditionBuilder->setJoinVariable($joinVariable); $this->compoundConditionBuilder->setOrderByProperty($orderByProperty); $condition = $this->compoundConditionBuilder->mapDescriptionToCondition($conceptDescription); $this->compoundConditionBuilder->getCircularReferenceGuard()->unmark($hash); return $condition; }