public function addPart(PartInterface $part, $name = null)
    {
        if ($name == null) {
            $name = $part->getName();
        }
        $this->parts[$name] = $part;
    }
public function addPart(PartInterface $part, $name = null)
    {
        if ($name == null) {
            $name = $part->getName();
        }
        $this->parts[$name] = $part;
    }
public function addPart ( PartInterface $ part , $ name = null ) { if ( $ name == null ) { $ name = $ part -> getName ( ) ; } $ this -> parts [ $ name ] = $ part ; }
Adds a part to the parts collection.

@param \AppserverIo\Appserver\ServletEngine\Http\Part $part A form part object
@param string                                         $name A manually defined name

@return void
Adds a part to the parts collection .