recurringEvents = $recurringEvents; } /** * @since 1.9 * * @param ParserParameterProcessor $parameters * * @return string|null */ public function parse( ParserParameterProcessor $parameters ) { $this->useFirstElementAsPropertyLabel( true ); $this->recurringEvents->parse( $parameters->toArray() ); $this->messageFormatter->addFromArray( $this->recurringEvents->getErrors() ); foreach ( $this->recurringEvents->getDates() as $date_str ) { // Override existing parameters array with the returned // pre-processed parameters array from recurring events $parameters->setParameters( $this->recurringEvents->getParameters() ); // Add the date string as individual property / value parameter $parameters->addParameter( $this->recurringEvents->getProperty(), $date_str ); // @see SubobjectParserFunction::addDataValuesToSubobject // Each new $parameters set will add an additional subobject // to the instance if ( $this->addDataValuesToSubobject( $parameters ) ) { $this->parserData->getSemanticData()->addSubobject( $this->subobject ); } // Collect errors that occurred during processing $this->messageFormatter->addFromArray( $this->subobject->getErrors() ); } // Update ParserOutput $this->parserData->pushSemanticDataToParserOutput(); $this->messageFormatter->addFromArray( $this->parserData->getErrors() ); return $this->messageFormatter->getHtml(); } }