static public function fromAddress($address)
    {
        if ($address instanceof Address) {
            $addr = $address->toClean();
            $prefix = substr($addr, 0, 1);
        }
        elseif (is_string($address)) {
            $prefix = substr($address, 0, 1);
        }
        else {
            throw new \InvalidArgumentException("Could not identify address format: " . var_export($address, true));
        }

        foreach (self::$networkInfos as $name => $spec) {
            $netChar = $spec['char'];

            if ($prefix == $netChar)
                return $spec["id"];
        }

        throw new \InvalidArgumentException("Could not identify network from provided address: " . var_export($address, true));
    }
static public function fromAddress($address)
    {
        if ($address instanceof Address) {
            $addr = $address->toClean();
            $prefix = substr($addr, 0, 1);
        }
        elseif (is_string($address)) {
            $prefix = substr($address, 0, 1);
        }
        else {
            throw new \InvalidArgumentException("Could not identify address format: " . var_export($address, true));
        }

        foreach (self::$networkInfos as $name => $spec) {
            $netChar = $spec['char'];

            if ($prefix == $netChar)
                return $spec["id"];
        }

        throw new \InvalidArgumentException("Could not identify network from provided address: " . var_export($address, true));
    }
static public function fromAddress ( $ address ) { if ( $ address instanceof Address ) { $ addr = $ address -> toClean ( ) ; $ prefix = substr ( $ addr , 0 , 1 ) ; } elseif ( is_string ( $ address ) ) { $ prefix = substr ( $ address , 0 , 1 ) ; } else { throw new \ InvalidArgumentException ( "Could not identify address format: " . var_export ( $ address , true ) ) ; } foreach ( self :: $ networkInfos as $ name => $ spec ) { $ netChar = $ spec [ 'char' ] ; if ( $ prefix == $ netChar ) return $ spec [ "id" ] ; } throw new \ InvalidArgumentException ( "Could not identify network from provided address: " . var_export ( $ address , true ) ) ; }
Load a NetworkInfo object from an `address`.

@param   string|\NEM\Models\Address  $address
@return  \NEM\Models\Model
@throws  \InvalidArgumentException     On invalid address format or unrecognized address first character.
Load a NetworkInfo object from an address .