public function merge(ManagerNodeInterface $managerNode)
    {

        // make sure, we only merge nodes with the same name
        if (strcasecmp($this->getName(), $managerNode->getName()) !== 0) {
            return;
        }

        // override type and factory attributes
        $this->type = $managerNode->getType();
        $this->factory = $managerNode->getFactory();
        $this->contextFactory = $managerNode->getContextFactory();
        $this->objectDescription = $managerNode->getObjectDescription();

        // load the authenticators of this manager node
        $localAuthenticators = $this->getAuthenticators();

        // iterate over the authenticator nodes of the passed manager node and merge them
        foreach ($managerNode->getAuthenticators() as $authenticatorNode) {
            $isMerged = false;
            foreach ($localAuthenticators as $key => $localAuthenticator) {
                if (strcasecmp($localAuthenticator->getName(), $authenticatorNode->getName()) === 0) {
                    $localAuthenticators[$key] = $authenticatorNode;
                    $isMerged = true;
                }
            }
            if ($isMerged === false) {
                $localAuthenticators[$authenticatorNode->getUuid()] = $authenticatorNode;
            }
        }

        // override the authenticators with the merged mones
        $this->authenticators = $localAuthenticators;

        // override the params if available
        if (sizeof($params = $managerNode->getParams()) > 0) {
            $this->params = $params;
        }

        // override the security domains if available
        if (sizeof($securityDomains = $managerNode->getSecurityDomains()) > 0) {
            $this->securityDomains = $securityDomains;
        }
    }
public function merge(ManagerNodeInterface $managerNode)
    {

        // make sure, we only merge nodes with the same name
        if (strcasecmp($this->getName(), $managerNode->getName()) !== 0) {
            return;
        }

        // override type and factory attributes
        $this->type = $managerNode->getType();
        $this->factory = $managerNode->getFactory();
        $this->contextFactory = $managerNode->getContextFactory();
        $this->objectDescription = $managerNode->getObjectDescription();

        // load the authenticators of this manager node
        $localAuthenticators = $this->getAuthenticators();

        // iterate over the authenticator nodes of the passed manager node and merge them
        foreach ($managerNode->getAuthenticators() as $authenticatorNode) {
            $isMerged = false;
            foreach ($localAuthenticators as $key => $localAuthenticator) {
                if (strcasecmp($localAuthenticator->getName(), $authenticatorNode->getName()) === 0) {
                    $localAuthenticators[$key] = $authenticatorNode;
                    $isMerged = true;
                }
            }
            if ($isMerged === false) {
                $localAuthenticators[$authenticatorNode->getUuid()] = $authenticatorNode;
            }
        }

        // override the authenticators with the merged mones
        $this->authenticators = $localAuthenticators;

        // override the params if available
        if (sizeof($params = $managerNode->getParams()) > 0) {
            $this->params = $params;
        }

        // override the security domains if available
        if (sizeof($securityDomains = $managerNode->getSecurityDomains()) > 0) {
            $this->securityDomains = $securityDomains;
        }
    }
public function merge ( ManagerNodeInterface $ managerNode ) { // make sure, we only merge nodes with the same name if ( strcasecmp ( $ this -> getName ( ) , $ managerNode -> getName ( ) ) !== 0 ) { return ; } // override type and factory attributes $ this -> type = $ managerNode -> getType ( ) ; $ this -> factory = $ managerNode -> getFactory ( ) ; $ this -> contextFactory = $ managerNode -> getContextFactory ( ) ; $ this -> objectDescription = $ managerNode -> getObjectDescription ( ) ; // load the authenticators of this manager node $ localAuthenticators = $ this -> getAuthenticators ( ) ; // iterate over the authenticator nodes of the passed manager node and merge them foreach ( $ managerNode -> getAuthenticators ( ) as $ authenticatorNode ) { $ isMerged = false ; foreach ( $ localAuthenticators as $ key => $ localAuthenticator ) { if ( strcasecmp ( $ localAuthenticator -> getName ( ) , $ authenticatorNode -> getName ( ) ) === 0 ) { $ localAuthenticators [ $ key ] = $ authenticatorNode ; $ isMerged = true ; } } if ( $ isMerged === false ) { $ localAuthenticators [ $ authenticatorNode -> getUuid ( ) ] = $ authenticatorNode ; } } // override the authenticators with the merged mones $ this -> authenticators = $ localAuthenticators ; // override the params if available if ( sizeof ( $ params = $ managerNode -> getParams ( ) ) > 0 ) { $ this -> params = $ params ; } // override the security domains if available if ( sizeof ( $ securityDomains = $ managerNode -> getSecurityDomains ( ) ) > 0 ) { $ this -> securityDomains = $ securityDomains ; } }
This method merges the configuration of the passed manager node
into this one.

@param \AppserverIo\Appserver\Core\Api\Node\ManagerNodeInterface $managerNode The node with the manager configuration we want to merge

@return void
This method merges the configuration of the passed manager node into this one .