Свойство | Type | Description | |
---|---|---|---|
$collections | array |
||
$environment | |||
$initialized | boolean | ||
$objectManager | Neos\Flow\ObjectManagement\ObjectManagerInterface | ||
$persistenceManager | Neos\Flow\Persistence\PersistenceManagerInterface | ||
$resourceRepository | |||
$settings | array | ||
$storages | array |
||
$systemLogger | Neos\Flow\Log\SystemLoggerInterface | ||
$targets | array |
Méthode | Description | |
---|---|---|
createResourceFromContent ( string $content, string $filename ) : |
Creates a resource from the given binary content as a persistent resource. | |
deleteResource ( |
Deletes the given PersistentResource from the ResourceRepository and, if the storage data is no longer used in another PersistentResource object, also deletes the data from the storage. | |
getCollection ( string $collectionName ) : Neos\Flow\ResourceManagement\CollectionInterface | Returns a Collection instance by the given name | |
getCollections ( ) : array |
Returns an array of currently known Collection instances | |
getCollectionsByStorage ( Neos\Flow\ResourceManagement\Storage\StorageInterface $storage ) : array |
Returns an array of Collection instances which use the given storage | |
getImportedResources ( ) : SplObjectStorage | Returns an object storage with all resource objects which have been imported by the ResourceManager during this script call. Each resource comes with an array of additional information about its import. | |
getPackageAndPathByPublicPath ( string $path ) : array | Return the package key and the relative path and filename from the given resource path | |
getPublicPackageResourceUri ( string $packageKey, string $relativePathAndFilename ) : string | Returns the public URI for a static resource provided by the specified package and in the given path below the package's resources directory. | |
getPublicPackageResourceUriByPath ( string $path ) : string | Returns the public URI for a static resource provided by the public package | |
getPublicPersistentResourceUri ( |
Returns the web accessible URI for the given resource object | |
getPublicPersistentResourceUriByHash ( string $resourceHash, string $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME ) : string | Returns the web accessible URI for the resource object specified by the given SHA1 hash. | |
getResourceBySha1 ( string $sha1Hash ) : |
Returns the resource object identified by the given SHA1 hash over the content, or NULL if no such PersistentResource object is known yet. | |
getStorage ( string $storageName ) : Neos\Flow\ResourceManagement\Storage\StorageInterface | Returns a Storage instance by the given name | |
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. | |
importResource ( string | resource $source, string $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, string $forcedPersistenceObjectIdentifier = null ) : |
Imports a resource (file) from the given location as a persistent resource. | |
importResourceFromContent ( string $content, string $filename, string $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, string $forcedPersistenceObjectIdentifier = null ) : |
Imports the given content passed as a string as a new persistent resource. | |
importUploadedResource ( array $uploadInfo, string $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME ) : |
Imports a resource (file) from the given upload info array as a persistent resource. | |
injectSettings ( array $settings ) : void | Injects the settings of this package | |
shutdownObject ( ) : void | Checks if recently imported resources really have been persisted - and if not, removes its data from the respective storage. |
Méthode | Description | |
---|---|---|
initialize ( ) : void | Initializes the ResourceManager by parsing the related configuration and registering the resource stream wrapper. | |
initializeCollections ( ) : void | Initializes the Collection objects according to the current settings | |
initializeStorages ( ) : void | Initializes the Storage objects according to the current settings | |
initializeTargets ( ) : void | Initializes the Target objects according to the current settings | |
prepareUploadedFileForImport ( array $uploadInfo ) : array | Prepare an uploaded file to be imported as resource object. Will check the validity of the file, move it outside of upload folder if open_basedir is enabled and check the filename. |
public createResourceFromContent ( string $content, string $filename ) : |
||
$content | string | The binary content to import |
$filename | string | The filename to use for the newly generated resource |
Résultat | A resource object representing the created resource or FALSE if an error occurred. |
public deleteResource ( |
||
$resource | The resource to delete | |
$unpublishResource | boolean | If the resource should be unpublished before deleting it from the storage |
Résultat | boolean | true if the resource was deleted, otherwise FALSE |
public getCollection ( string $collectionName ) : Neos\Flow\ResourceManagement\CollectionInterface | ||
$collectionName | string | Name of the collection as defined in the settings |
Résultat | Neos\Flow\ResourceManagement\CollectionInterface | or NULL |
public getCollections ( ) : array |
||
Résultat | array |
public getCollectionsByStorage ( Neos\Flow\ResourceManagement\Storage\StorageInterface $storage ) : array |
||
$storage | Neos\Flow\ResourceManagement\Storage\StorageInterface | |
Résultat | array |
public getImportedResources ( ) : SplObjectStorage | ||
Résultat | SplObjectStorage |
public getPackageAndPathByPublicPath ( string $path ) : array | ||
$path | string | The ressource path, like resource://Your.Package/Public/Image/Dummy.png |
Résultat | array | The array contains two value, first the packageKey followed by the relativePathAndFilename |
public getPublicPackageResourceUriByPath ( string $path ) : string | ||
$path | string | The ressource path, like resource://Your.Package/Public/Image/Dummy.png |
Résultat | string |
public getPublicPersistentResourceUri ( |
||
$resource | The resource object | |
Résultat | string | boolean | A URI as a string or FALSE if the collection of the resource is not found |
public getPublicPersistentResourceUriByHash ( string $resourceHash, string $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME ) : string | ||
$resourceHash | string | The SHA1 hash identifying the resource content |
$collectionName | string | Name of the collection the resource is part of |
Résultat | string | A URI as a string |
public getResourceBySha1 ( string $sha1Hash ) : |
||
$sha1Hash | string | The SHA1 identifying the data the PersistentResource stands for |
Résultat |
public getStorage ( string $storageName ) : Neos\Flow\ResourceManagement\Storage\StorageInterface | ||
$storageName | string | Name of the storage as defined in the settings |
Résultat | Neos\Flow\ResourceManagement\Storage\StorageInterface | or NULL |
public getStreamByResource ( |
||
$resource | The resource to retrieve the stream for | |
Résultat | resource | boolean | The resource stream or FALSE if the stream could not be obtained |
public importResource ( string | resource $source, string $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, string $forcedPersistenceObjectIdentifier = null ) : |
||
$source | string | resource | A URI (can therefore also be a path and filename) or a PHP resource stream(!) pointing to the PersistentResource to import |
$collectionName | string | Name of the collection this new resource should be added to. By default the standard collection for persistent resources is used. |
$forcedPersistenceObjectIdentifier | string | INTERNAL: Force the object identifier for this resource to the given UUID |
Résultat | A resource object representing the imported resource |
public importResourceFromContent ( string $content, string $filename, string $collectionName = ResourceManager::DEFAULT_PERSISTENT_COLLECTION_NAME, string $forcedPersistenceObjectIdentifier = null ) : |
||
$content | string | The binary content to import |
$filename | string | The filename to use for the newly generated resource |
$collectionName | string | Name of the collection this new resource should be added to. By default the standard collection for persistent resources is used. |
$forcedPersistenceObjectIdentifier | string | INTERNAL: Force the object identifier for this resource to the given UUID |
Résultat | A resource object representing the imported resource |
public importUploadedResource ( array $uploadInfo, string $collectionName = self::DEFAULT_PERSISTENT_COLLECTION_NAME ) : |
||
$uploadInfo | array | An array detailing the resource to import (expected keys: name, tmp_name) |
$collectionName | string | Name of the collection this uploaded resource should be added to |
Résultat | A resource object representing the imported resource |
protected initialize ( ) : void | ||
Résultat | void |
protected initializeCollections ( ) : void | ||
Résultat | void |
protected initializeStorages ( ) : void | ||
Résultat | void |
protected initializeTargets ( ) : void | ||
Résultat | void |
public injectSettings ( array $settings ) : void | ||
$settings | array | |
Résultat | void |
protected prepareUploadedFileForImport ( array $uploadInfo ) : array | ||
$uploadInfo | array | |
Résultat | array | Array of string with the two keys "filepath" (the path to get the filecontent from) and "filename" the filename of the originally uploaded file. |
public shutdownObject ( ) : void | ||
Résultat | void |
protected Environment,Neos\Flow\Utility $environment | ||
Résultat |
protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager | ||
Résultat | Neos\Flow\ObjectManagement\ObjectManagerInterface |
protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager | ||
Résultat | Neos\Flow\Persistence\PersistenceManagerInterface |
protected ResourceRepository,Neos\Flow\ResourceManagement $resourceRepository | ||
Résultat |
protected SystemLoggerInterface,Neos\Flow\Log $systemLogger | ||
Résultat | Neos\Flow\Log\SystemLoggerInterface |