PHP 클래스 Neos\Flow\ResourceManagement\Target\FileSystemTarget

상속: implements Neos\Flow\ResourceManagement\Target\TargetInterface
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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