public static function manufacture($partId, $manufacturerId, $manufacturerName)
    {
        $part = new self();

        // After instantiation of the object we apply the "PartWasManufacturedEvent".
        $part->apply(new PartWasManufacturedEvent($partId, $manufacturerId, $manufacturerName));

        return $part;
    }
public static function manufacture($partId, $manufacturerId, $manufacturerName)
    {
        $part = new self();

        // After instantiation of the object we apply the "PartWasManufacturedEvent".
        $part->apply(new PartWasManufacturedEvent($partId, $manufacturerId, $manufacturerName));

        return $part;
    }
public static function manufacture ( $ partId , $ manufacturerId , $ manufacturerName ) { $ part = new self ( ) ; // After instantiation of the object we apply the "PartWasManufacturedEvent". $ part -> apply ( new PartWasManufacturedEvent ( $ partId , $ manufacturerId , $ manufacturerName ) ) ; return $ part ; }
Factory method to create a part.
Factory method to create a part .