SetaPDF_Core_FileSpecification Class representing a file specification

File: /SetaPDF v2/Core/FileSpecification.php

Class hierarchy

Summary

Constants

FILE_SYSTEM_UNDEFINED

Default file system constant

FILE_SYSTEM_URL

public const string SetaPDF_Core_FileSpecification::FILE_SYSTEM_URL = 'URL'

URL file system contant


Properties


Static Methods

createDictionary()

public static SetaPDF_Core_FileSpecification::createDictionary (
string $fileSpecificationString
): SetaPDF_Core_Type_Dictionary

Creates a file specification dictionary.

Parameters
$fileSpecificationString : string
 

createEmbedded()

public static SetaPDF_Core_FileSpecification::createEmbedded (
SetaPDF_Core_Document $document, SetaPDF_Core_Reader_ReaderInterface|string $pathOrReader, string $filename [, array $fileStreamParams = array ( ) [, null|string $mimeType = null ]]
): SetaPDF_Core_FileSpecification

Create a file specification with an embedded file stream.

Parameters
$document : SetaPDF_Core_Document
 
$pathOrReader : SetaPDF_Core_Reader_ReaderInterface|string

A reader instance or a path to a file.

$filename : string

The filename in UTF-8 encoding.

$fileStreamParams : array

See setParams() method.

$mimeType : null|string

The subtype of the embedded file. Shall conform to the MIME media type names defined in Internet RFC 2046


Methods

__construct()

The constructor.

If the parameter cannot be evaluated to a dictionary it will be passed to the createDictionary method to create an appropriate dictionary.

Parameters
$fileSpecification : string|SetaPDF_Core_Type_IndirectObjectInterface|SetaPDF_Core_Type_Dictionary|SetaPDF_Core_Type_StringValue
 
Exceptions

Throws SetaPDF_Core_Type_Exception

See

getCollectionItem()

Get the collection item data.

getDescription()

public SetaPDF_Core_FileSpecification::getDescription (
[ string $encoding = 'UTF-8' ]
): null|string

Get the descriptive text associated with the file specification.

Parameters
$encoding : string
 

getDictionary()

getEmbeddedFileStream()

Get the embedded file stream object.

Parameters
$unicode : boolean

If true use the UF key. Otherwise the F key.

getFileSpecification()

Get the file specification value.

getFileSystem()

public SetaPDF_Core_FileSpecification::getFileSystem (
void
): null|string

Get name of the file system.

getUnicodeFileSpecification()

public SetaPDF_Core_FileSpecification::getUnicodeFileSpecification (
[ string $encoding = 'UTF-8' ]
): string|null

Get the unicode text file specification value.

Parameters
$encoding : string
 

getVolatile()

Get the volatile flag.

setCollectionItem()

Set the collection item data.

Parameters
$item : SetaPDF_Core_Type_Dictionary|null
 

setDescription()

public SetaPDF_Core_FileSpecification::setDescription (
string|null $desc [, string $encoding = 'UTF-8' ]
): void

Set the descriptive text associated with the file specification.

Parameters
$desc : string|null
 
$encoding : string
 

setEmbeddedFileStream()

public SetaPDF_Core_FileSpecification::setEmbeddedFileStream (
SetaPDF_Core_EmbeddedFileStream $embeddedFileStream [, bool $unicode = false ]
): void

Set the embedded file stream object.

Parameters
$embeddedFileStream : SetaPDF_Core_EmbeddedFileStream
 
$unicode : bool

If true use the UF key. Otherwise the F key.

setFileSpecification()

public SetaPDF_Core_FileSpecification::setFileSpecification (
string|null $fileSpecification
): void

Set the file specification value.

Parameters
$fileSpecification : string|null
 

setFileSystem()

public SetaPDF_Core_FileSpecification::setFileSystem (
null|string $fileSystem
): void

Set the file system name.

Parameters
$fileSystem : null|string
 

setUnicodeFileSpecification()

public SetaPDF_Core_FileSpecification::setUnicodeFileSpecification (
string|null $fileSpecification [, string $encoding = 'UTF-8' ]
): void

Set the unicode text file specification value.

Parameters
$fileSpecification : string|null
 
$encoding : string
 

setVolatile()

public SetaPDF_Core_FileSpecification::setVolatile (
boolean|null $volatile
): void

Set the volatile flag.

Parameters
$volatile : boolean|null