public function getFilenameFromPart($part)
    {

        $filename = '';

        if ($part->ifdparameters) {
            foreach ($part->dparameters as $object) {
                if (strtolower($object->attribute) == 'filename') {
                    $filename = $object->value;
                }
            }
        }

        if (!$filename && $part->ifparameters) {
            foreach ($part->parameters as $object) {
                if (strtolower($object->attribute) == 'name') {
                    $filename = $object->value;
                }
            }
        }

        return $filename;

    }
public function getFilenameFromPart($part)
    {

        $filename = '';

        if ($part->ifdparameters) {
            foreach ($part->dparameters as $object) {
                if (strtolower($object->attribute) == 'filename') {
                    $filename = $object->value;
                }
            }
        }

        if (!$filename && $part->ifparameters) {
            foreach ($part->parameters as $object) {
                if (strtolower($object->attribute) == 'name') {
                    $filename = $object->value;
                }
            }
        }

        return $filename;

    }
public function getFilenameFromPart ( $ part ) { $ filename = '' ; if ( $ part -> ifdparameters ) { foreach ( $ part -> dparameters as $ object ) { if ( strtolower ( $ object -> attribute ) == 'filename' ) { $ filename = $ object -> value ; } } } if ( ! $ filename && $ part -> ifparameters ) { foreach ( $ part -> parameters as $ object ) { if ( strtolower ( $ object -> attribute ) == 'name' ) { $ filename = $ object -> value ; } } } return $ filename ; }
Get The filename from part

@param $part
@return string
Get The filename from part