PHP Class Neos\Flow\ResourceManagement\Storage\StorageObject

This class is used internally as a representation of the actual storage data. The main purpose for Object is to transfer data and meta data from a storage to a publishing target. It must not be used outside the resource management framework.
Inheritance: implements Neos\Flow\ResourceManagement\ResourceMetaDataInterface
Show file Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Property Type Description
$fileSize integer The size of this object's data
$filename string The suggested filename
$md5 string MD5 hash identifying this object's data
$mediaType string The IANA media type of the stored data
$relativePublicationPath string A suggested relative path for publication of this data
$sha1 string SHA1 hash identifying this object's data
$stream Closure | resource A stream (or, before it is used the first time, a Closure which returns a stream) which can deliver the data of this Object

Public Methods

Method Description
getFileSize ( ) : integer Returns the size of the content of this storage object
getFilename ( ) : string Retrieve the suggested filename of this Object
getMd5 ( ) : string Returns the md5 hash of the content of this storage object
getMediaType ( ) : string Retrieve the IANA media type of this Object
getRelativePublicationPath ( ) : string Retrieve the suggested relative publication path
getSha1 ( ) : string Retrieve the SHA1 hash identifying the data of this object
getStream ( ) : resource Returns the data stream which can deliver the content of this storage object
setFileSize ( integer $fileSize ) : void Sets the size of the content of this storage object
setFilename ( string $filename ) : void Set the suggested filename of this Object
setMd5 ( string $md5 ) : void Sets the md5 hash of the content of this storage object
setMediaType ( string $mediaType ) : void Set the IANA media type of this Object
setRelativePublicationPath ( string $relativePublicationPath ) : void Set the suggested relative publication path
setSha1 ( string $sha1 ) : void Set the SHA1 hash identifying the data of this Object
setStream ( resource | Closure $stream ) : void Sets the data stream which can deliver the content of this storage object

Method Details

getFileSize() public method

Returns the size of the content of this storage object
public getFileSize ( ) : integer
return integer The content size

getFilename() public method

Retrieve the suggested filename of this Object
public getFilename ( ) : string
return string

getMd5() public method

Returns the md5 hash of the content of this storage object
public getMd5 ( ) : string
return string The MD5 hash

getMediaType() public method

Retrieve the IANA media type of this Object
public getMediaType ( ) : string
return string

getRelativePublicationPath() public method

Retrieve the suggested relative publication path

getSha1() public method

Retrieve the SHA1 hash identifying the data of this object
public getSha1 ( ) : string
return string

getStream() public method

Returns the data stream which can deliver the content of this storage object
public getStream ( ) : resource
return resource A data stream resource; if the stream is seekable, it is rewound to the start

setFileSize() public method

Sets the size of the content of this storage object
public setFileSize ( integer $fileSize ) : void
$fileSize integer The content size
return void

setFilename() public method

Set the suggested filename of this Object
public setFilename ( string $filename ) : void
$filename string
return void

setMd5() public method

Sets the md5 hash of the content of this storage object
public setMd5 ( string $md5 ) : void
$md5 string The MD5 hash
return void

setMediaType() public method

Set the IANA media type of this Object
public setMediaType ( string $mediaType ) : void
$mediaType string
return void

setRelativePublicationPath() public method

Set the suggested relative publication path
public setRelativePublicationPath ( string $relativePublicationPath ) : void
$relativePublicationPath string
return void

setSha1() public method

Set the SHA1 hash identifying the data of this Object
public setSha1 ( string $sha1 ) : void
$sha1 string
return void

setStream() public method

Instead of providing a stream (PHP resource), you can also pass a Closure which returns a stream when it is evaluated.
public setStream ( resource | Closure $stream ) : void
$stream resource | Closure The data stream, or a Closure which returns one
return void

Property Details

$fileSize protected property

The size of this object's data
protected int $fileSize
return integer

$filename protected property

The suggested filename
protected string $filename
return string

$md5 protected property

MD5 hash identifying this object's data
protected string $md5
return string

$mediaType protected property

The IANA media type of the stored data
protected string $mediaType
return string

$relativePublicationPath protected property

A suggested relative path for publication of this data
protected string $relativePublicationPath
return string

$sha1 protected property

SHA1 hash identifying this object's data
protected string $sha1
return string

$stream protected property

A stream (or, before it is used the first time, a Closure which returns a stream) which can deliver the data of this Object
protected Closure|resource $stream
return Closure | resource