static public function getFromId($networkId, $field = "name")
    {
        foreach (self::$networkInfos as $name => $spec) {
            if ($spec["id"] !== (int) $networkId) continue;

            if ($field === "name")
               return $name;
            elseif (in_array($field, array_keys($spec)))
                return $spec[$field];
            else
                // Field not recognized
                return null;
        }

        // Network ID not recognized
        return null;
    }
static public function getFromId($networkId, $field = "name")
    {
        foreach (self::$networkInfos as $name => $spec) {
            if ($spec["id"] !== (int) $networkId) continue;

            if ($field === "name")
               return $name;
            elseif (in_array($field, array_keys($spec)))
                return $spec[$field];
            else
                // Field not recognized
                return null;
        }

        // Network ID not recognized
        return null;
    }
static public function getFromId ( $ networkId , $ field = "name" ) { foreach ( self :: $ networkInfos as $ name => $ spec ) { if ( $ spec [ "id" ] !== ( int ) $ networkId ) continue ; if ( $ field === "name" ) return $ name ; elseif ( in_array ( $ field , array_keys ( $ spec ) ) ) return $ spec [ $ field ] ; else // Field not recognized return null ; } // Network ID not recognized return null ; }
Helper to load a network field from a given `networkId`.

@param   integer     $networkId
@param   string      $field          Defaults to "name".
@return  null|string|integer
Helper to load a network field from a given networkId .