src/snac/server/database/DBUtil.php
/**
     * Read a constellation from the database.
     *
     * Read constellation ID $mainID from the database.
     *
     * Use the optional flags to get only a partial constellation.  The flags are a bit mask, and can
     * be ORed together.  Certain shortcut flags are available, such as:
     *
     * ```
     * $FULL_CONSTELLATION = $READ_NRD | $READ_ALL_NAMES | $READ_BIOGHIST
     *                       | $READ_BIOGHIST | $READ_RELATIONS
     *                       | $READ_OTHER_EXCEPT_RELATIONS
     * $READ_SHORT_SUMMARY = $READ_NRD | $READ_PREFERRED_NAME | $READ_BIOGHIST
     * ```
     *
     * @param integer $mainID A constellation ID number
     *
     * @param integer $version optional An optional version number. When not supplied this function will look
     * up the most recent version, regardless of status.
     *
     * @param int $flags optional Flags to indicate which parts of the constellation to read
     *
     * @return \snac\data\Constellation or boolean If successful, return a constellation, else if not successful return false.
     *
     */
Read a constellation from the database.
Read constellation ID $mainID from the database.

Use the optional flags to get only a partial constellation.  The flags are a bit mask, and can
be ORed together.  Certain shortcut flags are available, such as.



@param integer $mainID A constellation ID number

@param integer $version optional An optional version number. When not supplied this function will look
up the most recent version, regardless of status.

@param int $flags optional Flags to indicate which parts of the constellation to read

@return \snac\data\Constellation or boolean If successful, return a constellation, else if not successful return false.
Read a constellation from the database . Read constellation ID $mainID from the database . Use the optional flags to get only a partial constellation . The flags are a bit mask and can be ORed together . Certain shortcut flags are available such as . @param integer $mainID A constellation ID number @param integer $version optional An optional version number . When not supplied this function will look up the most recent version regardless of status . @param int $flags optional Flags to indicate which parts of the constellation to read @return \ snac \ data \ Constellation or boolean If successful return a constellation else if not successful return false .
public function readConstellation($mainID, $version=null, $flags=0)
    {
        if (! $mainID)
        {
            return false;
        }
        if (! $version)
        {
            $version = $this->sql->selectCurrentVersion($mainID);
        }
        if (! $version)
        {
            return false;
        }
        $vhInfo = array('version' => $version,
                        'ic_id' => $mainID);
        $cObj = $this->selectConstellation($vhInfo, $flags);
        if ($cObj)
        {
            return $cObj;
        }
        return false;
    }
public function readConstellation ( $ mainID , $ version = null , $ flags = 0 ) { if ( ! $ mainID ) { return false ; } if ( ! $ version ) { $ version = $ this -> sql -> selectCurrentVersion ( $ mainID ) ; } if ( ! $ version ) { return false ; } $ vhInfo = array ( 'version' => $ version , 'ic_id' => $ mainID ) ; $ cObj = $ this -> selectConstellation ( $ vhInfo , $ flags ) ; if ( $ cObj ) { return $ cObj ; } return false ; }
Read a constellation from the database.
Read a constellation from the database .
/*
             * If you wanted to fill in Constellation->status aka setStatus() this would be the place to
             * readConstellationStatus() and setStatus(). Status is intentionally not populated because the
             * server may change it on the fly.
             */