PHP 클래스 Neos\Flow\ResourceManagement\Collection

상속: implements Neos\Flow\ResourceManagement\CollectionInterface
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$name string
$pathPatterns array
$resourceRepository ResourceRepository
$storage Neos\Flow\ResourceManagement\Storage\StorageInterface
$target Neos\Flow\ResourceManagement\Target\TargetInterface

공개 메소드들

메소드 설명
__construct ( string $name, Neos\Flow\ResourceManagement\Storage\StorageInterface $storage, Neos\Flow\ResourceManagement\Target\TargetInterface $target, array $pathPatterns ) Constructor
getName ( ) : string Returns the name of this collection
getObjects ( callable $callback = null ) : Generator Returns all internal data objects of the storage attached to this collection.
getStorage ( ) : Neos\Flow\ResourceManagement\Storage\StorageInterface Returns the storage used for this collection
getStreamByResource ( PersistentResource $resource ) : resource | boolean Returns a stream handle of the given persistent resource which allows for opening / copying the resource's data. Note that this stream handle may only be used read-only.
getTarget ( ) : Neos\Flow\ResourceManagement\Target\TargetInterface Returns the publication target defined for this collection
importResource ( string | resource $source ) : PersistentResource Imports a resource (file) from the given URI or PHP resource stream into this collection.
importResourceFromContent ( string $content ) : PersistentResource Imports a resource from the given string content into this collection.
publish ( ) : void Publishes the whole collection to the corresponding publishing target

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( string $name, Neos\Flow\ResourceManagement\Storage\StorageInterface $storage, Neos\Flow\ResourceManagement\Target\TargetInterface $target, array $pathPatterns )
$name string User-space name of this collection, as specified in the settings
$storage Neos\Flow\ResourceManagement\Storage\StorageInterface The storage for data used in this collection
$target Neos\Flow\ResourceManagement\Target\TargetInterface The publication target for this collection
$pathPatterns array Glob patterns for paths to consider – only supported by specific storages

getName() 공개 메소드

Returns the name of this collection
public getName ( ) : string
리턴 string

getObjects() 공개 메소드

Returns all internal data objects of the storage attached to this collection.
public getObjects ( callable $callback = null ) : Generator
$callback callable Function called after each object
리턴 Generator

getStorage() 공개 메소드

Returns the storage used for this collection
public getStorage ( ) : Neos\Flow\ResourceManagement\Storage\StorageInterface
리턴 Neos\Flow\ResourceManagement\Storage\StorageInterface

getStreamByResource() 공개 메소드

Returns a stream handle of the given persistent resource which allows for opening / copying the resource's data. Note that this stream handle may only be used read-only.
public getStreamByResource ( PersistentResource $resource ) : resource | boolean
$resource PersistentResource The resource to retrieve the stream for
리턴 resource | boolean | boolean The resource stream or FALSE if the stream could not be obtained

getTarget() 공개 메소드

Returns the publication target defined for this collection
public getTarget ( ) : Neos\Flow\ResourceManagement\Target\TargetInterface
리턴 Neos\Flow\ResourceManagement\Target\TargetInterface

importResource() 공개 메소드

On a successful import this method returns a PersistentResource object representing the newly imported persistent resource. Note that this collection must have a writable storage in order to import resources.
public importResource ( string | resource $source ) : PersistentResource
$source string | resource
리턴 PersistentResource A resource object representing the imported resource

importResourceFromContent() 공개 메소드

On a successful import this method returns a PersistentResource object representing the newly imported persistent resource. Note that this collection must have a writable storage in order to import resources. The specified filename will be used when presenting the resource to a user. Its file extension is important because the resource management will derive the IANA Media Type from it.
public importResourceFromContent ( string $content ) : PersistentResource
$content string The actual content to import
리턴 PersistentResource A resource object representing the imported resource

publish() 공개 메소드

Publishes the whole collection to the corresponding publishing target
public publish ( ) : void
리턴 void

프로퍼티 상세

$name 보호되어 있는 프로퍼티

protected string $name
리턴 string

$pathPatterns 보호되어 있는 프로퍼티

protected array $pathPatterns
리턴 array

$resourceRepository 보호되어 있는 프로퍼티

protected ResourceRepository,Neos\Flow\ResourceManagement $resourceRepository
리턴 ResourceRepository

$storage 보호되어 있는 프로퍼티

protected StorageInterface,Neos\Flow\ResourceManagement\Storage $storage
리턴 Neos\Flow\ResourceManagement\Storage\StorageInterface

$target 보호되어 있는 프로퍼티

protected TargetInterface,Neos\Flow\ResourceManagement\Target $target
리턴 Neos\Flow\ResourceManagement\Target\TargetInterface