/**
  * @see ApiBase::execute
  */
 public function execute()
 {
     $params = $this->extractRequestParams();
     $applicationFactory = ApplicationFactory::getInstance();
     $propertyListByApiRequest = new PropertyListByApiRequest($applicationFactory->getStore(), $applicationFactory->getPropertySpecificationLookup());
     $propertyListByApiRequest->setLimit($params['limit']);
     $propertyListByApiRequest->setListOnly($params['listonly']);
     $propertyListByApiRequest->setLanguageCode($params['lang']);
     $propertyListByApiRequest->findPropertyListBy($params['property']);
     foreach ($propertyListByApiRequest->getNamespaces() as $ns) {
         $uri = NamespaceUriFinder::getUri($ns);
         if (!$uri) {
             continue;
         }
         $this->getResult()->addValue(null, 'xmlns:' . $ns, $uri);
     }
     $data = $propertyListByApiRequest->getPropertyList();
     // I'm without words for this utter nonsense introduced here
     // because property keys can have a underscore _MDAT or for that matter
     // any other data field can
     // https://www.mediawiki.org/wiki/API:JSON_version_2
     // " ... can indicate that a property beginning with an underscore is not metadata using"
     if (method_exists($this->getResult(), 'setPreserveKeysList')) {
         $this->getResult()->setPreserveKeysList($data, array_keys($data));
     }
     $this->getResult()->addValue(null, 'query', $data);
     $this->getResult()->addValue(null, 'version', 2);
     $this->getResult()->addValue(null, 'query-continue-offset', $propertyListByApiRequest->getContinueOffset());
     $this->getResult()->addValue(null, 'meta', $propertyListByApiRequest->getMeta());
 }