src/snac/server/database/DBUtil.php
/**
     * Update Constellation Lookup
     *
     * Update the lookup table so that queries to the oldConstellation will be automatically redirected
     * to read the newConstellation.
     *
     * @param \snac\data\Constellation $oldConstellation The constellation to redirect
     * @param \snac\data\Constellation[] $newConstellations The constellations to return when querying for oldConstellation
     * @return boolean true on success, false otherwise
     */
Update Constellation Lookup
Update the lookup table so that queries to the oldConstellation will be automatically redirected
to read the newConstellation.


Update Constellation Lookup Update the lookup table so that queries to the oldConstellation will be automatically redirected to read the newConstellation .
public function updateConstellationLookup(&$oldConstellation, &$newConstellations) {
        if ($oldConstellation === null || $newConstellations === null
                || !is_array($newConstellations) || empty($newConstellations))
            return false;
        if ($oldConstellation->getID() === null || $oldConstellation->getArk() === null)
            return false;
        foreach ($newConstellations as $newConstellation) {
            if ($newConstellation->getID() === null || $newConstellation->getArk() === null)
                return false;
        }
        $newLookups = array();
        foreach ($newConstellations as $newConstellation) {
            $newLookups[$newConstellation->getID()] = $newConstellation->getArk();
        }
        $this->sql->updateConstellationLookup($oldConstellation->getID(), $oldConstellation->getArk(),
            $newLookups);
        return true;
    }
public function updateConstellationLookup ( & $ oldConstellation , & $ newConstellations ) { if ( $ oldConstellation === null || $ newConstellations === null || ! is_array ( $ newConstellations ) || empty ( $ newConstellations ) ) return false ; if ( $ oldConstellation -> getID ( ) === null || $ oldConstellation -> getArk ( ) === null ) return false ; foreach ( $ newConstellations as $ newConstellation ) { if ( $ newConstellation -> getID ( ) === null || $ newConstellation -> getArk ( ) === null ) return false ; } $ newLookups = array ( ) ; foreach ( $ newConstellations as $ newConstellation ) { $ newLookups [ $ newConstellation -> getID ( ) ] = $ newConstellation -> getArk ( ) ; } $ this -> sql -> updateConstellationLookup ( $ oldConstellation -> getID ( ) , $ oldConstellation -> getArk ( ) , $ newLookups ) ; return true ; }
Update Constellation Lookup
 Update the lookup table so that queries to the oldConstellation will be automatically redirected
 to read the newConstellation.
Update Constellation Lookup Update the lookup table so that queries to the oldConstellation will be automatically redirected to read the newConstellation .
// Check input for valid values // Build the argument array for lookups