static public function getDefinition($mosaic)
    {
        // read the mosaic's fully qualified name
        if ($mosaic instanceof Mosaic) {
            $fqn = $mosaic->getFQN();
        }
        elseif ($mosaic instanceof MosaicAttachment) {
            $fqn = $mosaic->mosaicId()->getFQN();
        }
        elseif (is_string($mosaic)) {
            $fqn = $mosaic;
        }
        else {
            throw new InvalidArgumentException("Unrecognized `mosaic` parameter to \\NEM\\Models\\Mosaics\\Registry::getDefinition().");
        }

        $preconfigClass = self::morphClass($fqn);
        if (false !== $preconfigClass && class_exists($preconfigClass)) {
            // Pre-Configured mosaic definition found
            return new $preconfigClass();
        }

        // no pre-configured mosaic definition class found, use NIS
        // Web service to read mosaic definition.

        return false;
    }
static public function getDefinition($mosaic)
    {
        // read the mosaic's fully qualified name
        if ($mosaic instanceof Mosaic) {
            $fqn = $mosaic->getFQN();
        }
        elseif ($mosaic instanceof MosaicAttachment) {
            $fqn = $mosaic->mosaicId()->getFQN();
        }
        elseif (is_string($mosaic)) {
            $fqn = $mosaic;
        }
        else {
            throw new InvalidArgumentException("Unrecognized `mosaic` parameter to \\NEM\\Models\\Mosaics\\Registry::getDefinition().");
        }

        $preconfigClass = self::morphClass($fqn);
        if (false !== $preconfigClass && class_exists($preconfigClass)) {
            // Pre-Configured mosaic definition found
            return new $preconfigClass();
        }

        // no pre-configured mosaic definition class found, use NIS
        // Web service to read mosaic definition.

        return false;
    }
static public function getDefinition ( $ mosaic ) { // read the mosaic's fully qualified name if ( $ mosaic instanceof Mosaic ) { $ fqn = $ mosaic -> getFQN ( ) ; } elseif ( $ mosaic instanceof MosaicAttachment ) { $ fqn = $ mosaic -> mosaicId ( ) -> getFQN ( ) ; } elseif ( is_string ( $ mosaic ) ) { $ fqn = $ mosaic ; } else { throw new InvalidArgumentException ( "Unrecognized `mosaic` parameter to \\NEM\\Models\\Mosaics\\Registry::getDefinition()." ) ; } $ preconfigClass = self :: morphClass ( $ fqn ) ; if ( false !== $ preconfigClass && class_exists ( $ preconfigClass ) ) { // Pre-Configured mosaic definition found return new $ preconfigClass ( ) ; } // no pre-configured mosaic definition class found, use NIS // Web service to read mosaic definition. return false ; }
Load a pre-configured mosaic definition or fetch it using the
Infrastructure service for Mosaics.

@param   \NEM\Models\Mosaic|\NEM\Models\MosaicAttachment|string     $mosaic     The mosaic object or name for which to get the definition.
@param   string|integer                                             $network    Default is mainnet (104), testnet is -104 (0x98) and mijin is 96 (0x60)
@return  \NEM\Models\MosaicDefinition
@throws  \InvalidArgumentException       On invalid `mosaic` parameter.
Load a pre - configured mosaic definition or fetch it using the Infrastructure service for Mosaics .