public function attachFile( $fileName, $name = false, $mimeType = false )
    {
        $name = ( $name === false ? basename( $fileName ) : $name );

        $this->attachMemoryFile( 
            file_get_contents( $fileName ),
            $name,
            $mimeType
        );
    }
public function attachFile( $fileName, $name = false, $mimeType = false )
    {
        $name = ( $name === false ? basename( $fileName ) : $name );

        $this->attachMemoryFile( 
            file_get_contents( $fileName ),
            $name,
            $mimeType
        );
    }
public function attachFile ( $ fileName , $ name = false , $ mimeType = false ) { $ name = ( $ name === false ? basename ( $ fileName ) : $ name ) ; $ this -> attachMemoryFile ( file_get_contents ( $ fileName ) , $ name , $ mimeType ) ; }
Attach file to document

The file passed to the method will be attached to the document and
stored in the database. By default the filename of the provided file
will be ued as a name, but you may optionally specify a name as the
second parameter of the method.

You may optionally specify a custom mime type as third parameter. If set
it will be used, but not verified, that it matches the actual file
contents. If left empty the mime type defaults to
'application/octet-stream'.

@param string $fileName
@param string $name
@param string $mimeType
@return void
Attach file to document