Esempio n. 1
0
 /**
  * Checks whether the parser output has some layer data which should be stored of the
  * given title and performs the task.
  *
  * @since 3.0
  *
  * @param ParserOutput $parserOutput
  * @param Title $title 
  */
 protected static function processLayersStoreCandidate(ParserOutput $parserOutput, Title $title)
 {
     // if site which is being parsed is in maps namespace:
     if ($title->getNamespace() === Maps_NS_LAYER) {
         if (!isset($parserOutput->mExtMapsLayers)) {
             $parserOutput->mExtMapsLayers = new MapsLayerGroup();
         }
         // get MapsLayerGroup object with layers to be stored:
         $mapsForStore = $parserOutput->mExtMapsLayers;
         // store layers in database (also deletes previous definitions still in db):
         MapsLayers::storeLayers($mapsForStore, $title);
     }
 }