static public function create(string $namespace, string $mosaic = null)
    {
        if (empty($mosaic)) {
            // `namespace` should contain `FQN`
            $fullyQualifiedName = $namespace;
            $splitRegexp = "/([^:]+):([^:]+)/";

            // split with format: `namespace:mosaic`
            $namespace = preg_replace($splitRegexp, "$1", $fullyQualifiedName);
            $mosaic    = preg_replace($splitRegexp, "$2", $fullyQualifiedName);
        }

        if (empty($namespace) || empty($mosaic)) {
            throw new RuntimeException("Missing namespace or mosaic name for \\NEM\\Models\\Mosaic instance.");
        }

        return new static([
            "namespaceId" => $namespace,
            "name" => $mosaic
        ]);
    }
static public function create(string $namespace, string $mosaic = null)
    {
        if (empty($mosaic)) {
            // `namespace` should contain `FQN`
            $fullyQualifiedName = $namespace;
            $splitRegexp = "/([^:]+):([^:]+)/";

            // split with format: `namespace:mosaic`
            $namespace = preg_replace($splitRegexp, "$1", $fullyQualifiedName);
            $mosaic    = preg_replace($splitRegexp, "$2", $fullyQualifiedName);
        }

        if (empty($namespace) || empty($mosaic)) {
            throw new RuntimeException("Missing namespace or mosaic name for \\NEM\\Models\\Mosaic instance.");
        }

        return new static([
            "namespaceId" => $namespace,
            "name" => $mosaic
        ]);
    }
static public function create ( string $ namespace , string $ mosaic = null ) { if ( empty ( $ mosaic ) ) { // `namespace` should contain `FQN` $ fullyQualifiedName = $ namespace ; $ splitRegexp = "/([^:]+):([^:]+)/" ; // split with format: `namespace:mosaic` $ namespace = preg_replace ( $ splitRegexp , "$1" , $ fullyQualifiedName ) ; $ mosaic = preg_replace ( $ splitRegexp , "$2" , $ fullyQualifiedName ) ; } if ( empty ( $ namespace ) || empty ( $ mosaic ) ) { throw new RuntimeException ( "Missing namespace or mosaic name for \\NEM\\Models\\Mosaic instance." ) ; } return new static ( [ "namespaceId" => $ namespace , "name" => $ mosaic ] ) ; }
Class method to create a new `Mosaic` object from `namespace`
name and `mosaic` mosaic name.

@param   string      $namespace
@param   string      $mosaic
@return  \NEM\Models\Mosaic
Class method to create a new Mosaic object from namespace name and mosaic mosaic name .