Attachment
        
        extends DataPart
    
    
            
            in package
            
        
    
            
            implements
                            AttachmentInterface                    
    
    
Clase para representar un archivo adjunto en un documento.
Table of Contents
Interfaces
- AttachmentInterface
- Interfaz para la clase que representa un archivo adjunto de un documento.
Properties
- $size : int
- Tamaño del archivo.
Methods
- __construct() : mixed
- Constructor del archivo adjunto.
- getContentType() : string
- Obtiene el tipo del archivo.
- getSize() : int
- Obtiene el tamaño del archivo.
- toArray() : array<string|int, mixed>
- Obtiene un arreglo con todos los atributos del archivo.
- guessContentType() : string
- Adivina el Content Type del contenido del archivo a partir de la extensión del nombre del archivo.
Properties
$size
Tamaño del archivo.
        private
            int
    $size
    
    
    
    
    
    
Methods
__construct()
Constructor del archivo adjunto.
    public
                    __construct(string|File $body[, string|null $filename = null ][, string|null $contentType = null ][, string|null $encoding = null ][, int|null $size = null ]) : mixed
    Parameters
- $body : string|File
- $filename : string|null = null
- $contentType : string|null = null
- $encoding : string|null = null
- $size : int|null = null
getContentType()
Obtiene el tipo del archivo.
    public
                    getContentType() : string
    Return values
stringgetSize()
Obtiene el tamaño del archivo.
    public
                    getSize() : int
    Return values
inttoArray()
Obtiene un arreglo con todos los atributos del archivo.
    public
                    toArray() : array<string|int, mixed>
    Return values
array<string|int, mixed>guessContentType()
Adivina el Content Type del contenido del archivo a partir de la extensión del nombre del archivo.
    private
                    guessContentType(string $filename) : string
    Parameters
- $filename : string