Exemplo n.º 1
0
 /**
  * @see ParamDefinition::setArrayValues()
  *
  * @since 2.0
  *
  * @param array $param
  */
 public function setArrayValues(array $param)
 {
     parent::setArrayValues($param);
     if (array_key_exists('feature', $param)) {
         $this->setFeature($param['feature']);
     }
 }
 /**
  * Formats the parameter value to it's final result.
  *
  * @since 1.8
  *
  * @param mixed $value
  * @param IParam $param
  * @param IParamDefinition[] $definitions
  * @param IParam[] $params
  *
  * @return mixed
  */
 protected function formatValue($value, IParam $param, array &$definitions, array $params)
 {
     $value = parent::formatValue($value, $param, $definitions, $params);
     // Make sure the format value is valid.
     $value = self::getValidFormatName($value);
     // Add the formats parameters to the parameter list.
     $queryPrinter = SMWQueryProcessor::getResultPrinter($value);
     $definitions = $queryPrinter->getParamDefinitions($definitions);
     return $value;
 }