SetaPDF_Core_FileSpecification Class representing a file specification

File: /SetaPDF/Core/FileSpecification.php

Class hierarchy

Summary

Constants

FILE_SYSTEM_UNDEFINED

Default file system constant

FILE_SYSTEM_URL

URL file system contant


Properties


Static Methods

createDictionary()

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

Creates a file specification dictionary.

Parameters
$fileSpecificationString : string
 

createEmbedded()

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

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
 
See

getCollectionItem()

Get the collection item data.

getDescription()

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

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 null|string SetaPDF_Core_FileSpecification::getFileSystem ( void )

Get name of the file system.

getUnicodeFileSpecification()

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

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 void SetaPDF_Core_FileSpecification::setDescription ( string|null $desc [, string $encoding = 'UTF-8' ] )

Set the descriptive text associated with the file specification.

Parameters
$desc : string|null
 
$encoding : string
 

setEmbeddedFileStream()

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

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 void SetaPDF_Core_FileSpecification::setFileSpecification ( string|null $fileSpecification )

Set the file specification value.

Parameters
$fileSpecification : string|null
 

setFileSystem()

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

Set the file system name.

Parameters
$fileSystem : null|string
 

setUnicodeFileSpecification()

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

Set the unicode text file specification value.

Parameters
$fileSpecification : string|null
 
$encoding : string
 

setVolatile()

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

Set the volatile flag.

Parameters
$volatile : boolean|null