protected function parseSpecificContributions(&$contribNode) { parent::parseSpecificContributions($contribNode); if ($contribNode->nodeName != "actions") { return; } $actionXpath = new DOMXPath($contribNode->ownerDocument); $loginCallbackNodeList = $actionXpath->query('//clientCallback', $contribNode); $callbackNode = $loginCallbackNodeList->item(0); $xmlContent = $callbackNode->firstChild->wholeText; $sources = array(); if (!isset($this->options) || !isset($this->options["DRIVERS"]) || !is_array($this->options["DRIVERS"])) { return; } foreach ($this->options["DRIVERS"] as $driverDef) { $dName = $driverDef["NAME"]; if (isset($driverDef["LABEL"])) { $dLabel = $driverDef["LABEL"]; } else { $dLabel = $driverDef["NAME"]; } $sources[$dName] = $dLabel; } $xmlContent = str_replace("AJXP_MULTIAUTH_SOURCES", json_encode($sources), $xmlContent); $xmlContent = str_replace("AJXP_MULTIAUTH_MASTER", $this->options["MASTER_DRIVER"], $xmlContent); $xmlContent = str_replace("AJXP_USER_ID_SEPARATOR", $this->options["USER_ID_SEPARATOR"], $xmlContent); if ($callbackNode) { $callbackNode->removeChild($callbackNode->firstChild); $callbackNode->appendChild($contribNode->ownerDocument->createCDATASection($xmlContent)); } }