PHP Класс Neos\Flow\ResourceManagement\Target\FileSystemTarget

Наследование: implements Neos\Flow\ResourceManagement\Target\TargetInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$absoluteBaseUri string The resolved absolute web URI for this target. If $baseUri was absolute this will be the same, otherwise the request base uri will be prepended.
$baseUri string Can be relative to website's base Uri, for example "_Resources/MySpecialTarget/". If resources should be served from a different domain, make sure to specify an absolute URI though
$bootstrap Neos\Flow\Core\Bootstrap
$extensionBlacklist array A list of extensions that are blacklisted and must not be published by this target.
$httpBaseUri string The configured Neos.Flow.http.baseUri to use as fallback if no absolute baseUri is configured and if it can't be determined from the current request (e.g. in CLI mode)
$messageCollector Neos\Flow\ResourceManagement\Publishing\MessageCollector
$name string Name which identifies this publishing target
$options array
$path string The path (in a filesystem) where resources are published to
$resourceRepository Neos\Flow\ResourceManagement\ResourceRepository
$subdivideHashPathSegment boolean If the generated URI path segment containing the sha1 should be divided into multiple segments
$systemLogger Neos\Flow\Log\SystemLoggerInterface

Открытые методы

Метод Описание
__construct ( string $name, array $options = [] ) Constructor
getName ( ) : string Returns the name of this target instance
getPublicPersistentResourceUri ( PersistentResource $resource ) : string Returns the web accessible URI pointing to the specified persistent resource
getPublicStaticResourceUri ( string $relativePathAndFilename ) : string Returns the web accessible URI pointing to the given static resource
initializeObject ( ) : void Initializes this resource publishing target
publishCollection ( Neos\Flow\ResourceManagement\CollectionInterface $collection, callable $callback = null ) : void Publishes the whole collection to this target
publishResource ( PersistentResource $resource, Neos\Flow\ResourceManagement\CollectionInterface $collection ) : void Publishes the given persistent resource from the given storage
unpublishResource ( PersistentResource $resource ) : void Unpublishes the given persistent resource

Защищенные методы

Метод Описание
detectResourcesBaseUri ( ) : string Detects and returns the website's absolute base URI
encodeRelativePathAndFilenameForUri ( string $relativePathAndFilename ) : string Applies rawurlencode() to all path segments of the given $relativePathAndFilename
getRelativePublicationPathAndFilename ( Neos\Flow\ResourceManagement\ResourceMetaDataInterface $object ) : string Determines and returns the relative path and filename for the given Storage Object or PersistentResource. If the given object represents a persistent resource, its own relative publication path will be empty. If the given object represents a static resources, it will contain a relative path.
getResourcesBaseUri ( ) : string Returns the resolved absolute base URI for resources of this target.
handleMissingData ( Neos\Flow\ResourceManagement\ResourceMetaDataInterface $resource, Neos\Flow\ResourceManagement\CollectionInterface $collection ) Handle missing data notification
publishFile ( resource $sourceStream, string $relativeTargetPathAndFilename ) : void Publishes the given source stream to this target, with the given relative path.
setOption ( string $key, mixed $value ) : boolean Set an option value and return if it was set.
unpublishFile ( string $relativeTargetPathAndFilename ) : void Removes the specified target file from the public directory

Описание методов

__construct() публичный Метод

Constructor
public __construct ( string $name, array $options = [] )
$name string Name of this target instance, according to the resource settings
$options array Options for this target

detectResourcesBaseUri() защищенный Метод

Detects and returns the website's absolute base URI
protected detectResourcesBaseUri ( ) : string
Результат string The resolved resource base URI, @see getResourcesBaseUri()

encodeRelativePathAndFilenameForUri() защищенный Метод

Applies rawurlencode() to all path segments of the given $relativePathAndFilename
protected encodeRelativePathAndFilenameForUri ( string $relativePathAndFilename ) : string
$relativePathAndFilename string
Результат string

getName() публичный Метод

Returns the name of this target instance
public getName ( ) : string
Результат string

getPublicPersistentResourceUri() публичный Метод

Returns the web accessible URI pointing to the specified persistent resource
public getPublicPersistentResourceUri ( PersistentResource $resource ) : string
$resource Neos\Flow\ResourceManagement\PersistentResource PersistentResource object
Результат string The URI

getPublicStaticResourceUri() публичный Метод

Returns the web accessible URI pointing to the given static resource
public getPublicStaticResourceUri ( string $relativePathAndFilename ) : string
$relativePathAndFilename string Relative path and filename of the static resource
Результат string The URI

getRelativePublicationPathAndFilename() защищенный Метод

No matter which kind of resource, persistent or static, this function will return a sub directory structure if no relative publication path was defined in the given object.
protected getRelativePublicationPathAndFilename ( Neos\Flow\ResourceManagement\ResourceMetaDataInterface $object ) : string
$object Neos\Flow\ResourceManagement\ResourceMetaDataInterface PersistentResource or Storage Object
Результат string The relative path and filename, for example "c/8/2/8/c828d0f88ce197be1aff7cc2e5e86b1244241ac6/MyPicture.jpg" (if subdivideHashPathSegment is on) or "c828d0f88ce197be1aff7cc2e5e86b1244241ac6/MyPicture.jpg" (if it's off)

getResourcesBaseUri() защищенный Метод

Returns the resolved absolute base URI for resources of this target.
protected getResourcesBaseUri ( ) : string
Результат string The absolute base URI for resources in this target

handleMissingData() защищенный Метод

Handle missing data notification
protected handleMissingData ( Neos\Flow\ResourceManagement\ResourceMetaDataInterface $resource, Neos\Flow\ResourceManagement\CollectionInterface $collection )
$resource Neos\Flow\ResourceManagement\ResourceMetaDataInterface
$collection Neos\Flow\ResourceManagement\CollectionInterface

initializeObject() публичный Метод

Initializes this resource publishing target
public initializeObject ( ) : void
Результат void

publishCollection() публичный Метод

Publishes the whole collection to this target
public publishCollection ( Neos\Flow\ResourceManagement\CollectionInterface $collection, callable $callback = null ) : void
$collection Neos\Flow\ResourceManagement\CollectionInterface The collection to publish
$callback callable Function called after each resource publishing
Результат void

publishFile() защищенный Метод

Publishes the given source stream to this target, with the given relative path.
protected publishFile ( resource $sourceStream, string $relativeTargetPathAndFilename ) : void
$sourceStream resource Stream of the source to publish
$relativeTargetPathAndFilename string relative path and filename in the target directory
Результат void

publishResource() публичный Метод

Publishes the given persistent resource from the given storage
public publishResource ( PersistentResource $resource, Neos\Flow\ResourceManagement\CollectionInterface $collection ) : void
$resource Neos\Flow\ResourceManagement\PersistentResource The resource to publish
$collection Neos\Flow\ResourceManagement\CollectionInterface The collection the given resource belongs to
Результат void

setOption() защищенный Метод

Set an option value and return if it was set.
protected setOption ( string $key, mixed $value ) : boolean
$key string
$value mixed
Результат boolean

unpublishFile() защищенный Метод

This method fails silently if the given file could not be unpublished or already didn't exist anymore.
protected unpublishFile ( string $relativeTargetPathAndFilename ) : void
$relativeTargetPathAndFilename string relative path and filename in the target directory
Результат void

unpublishResource() публичный Метод

Unpublishes the given persistent resource
public unpublishResource ( PersistentResource $resource ) : void
$resource Neos\Flow\ResourceManagement\PersistentResource The resource to unpublish
Результат void

Описание свойств

$absoluteBaseUri защищенное свойство

The resolved absolute web URI for this target. If $baseUri was absolute this will be the same, otherwise the request base uri will be prepended.
protected string $absoluteBaseUri
Результат string

$baseUri защищенное свойство

Can be relative to website's base Uri, for example "_Resources/MySpecialTarget/". If resources should be served from a different domain, make sure to specify an absolute URI though
protected string $baseUri
Результат string

$bootstrap защищенное свойство

protected Bootstrap,Neos\Flow\Core $bootstrap
Результат Neos\Flow\Core\Bootstrap

$extensionBlacklist защищенное свойство

A list of extensions that are blacklisted and must not be published by this target.
protected array $extensionBlacklist
Результат array

$httpBaseUri защищенное свойство

The configured Neos.Flow.http.baseUri to use as fallback if no absolute baseUri is configured and if it can't be determined from the current request (e.g. in CLI mode)
protected string $httpBaseUri
Результат string

$messageCollector защищенное свойство

protected MessageCollector,Neos\Flow\ResourceManagement\Publishing $messageCollector
Результат Neos\Flow\ResourceManagement\Publishing\MessageCollector

$name защищенное свойство

Name which identifies this publishing target
protected string $name
Результат string

$options защищенное свойство

protected array $options
Результат array

$path защищенное свойство

The path (in a filesystem) where resources are published to
protected string $path
Результат string

$resourceRepository защищенное свойство

protected ResourceRepository,Neos\Flow\ResourceManagement $resourceRepository
Результат Neos\Flow\ResourceManagement\ResourceRepository

$subdivideHashPathSegment защищенное свойство

If the generated URI path segment containing the sha1 should be divided into multiple segments
protected bool $subdivideHashPathSegment
Результат boolean

$systemLogger защищенное свойство

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
Результат Neos\Flow\Log\SystemLoggerInterface