PHP Класс Neos\Flow\ResourceManagement\Storage\FileSystemStorage

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

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

Свойство Тип Описание
$environment Neos\Flow\Utility\Environment
$name string Name which identifies this resource storage
$path string The path (in a filesystem) where resources are stored
$resourceManager Neos\Flow\ResourceManagement\ResourceManager
$resourceRepository Neos\Flow\ResourceManagement\ResourceRepository

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

Метод Описание
__construct ( string $name, array $options = [] ) Constructor
getName ( ) : string Returns the instance name of this storage
getObjects ( callable $callback = null ) : Generator Retrieve all Objects stored in this storage.
getObjectsByCollection ( Neos\Flow\ResourceManagement\CollectionInterface $collection, callable $callback = null ) : Generator Retrieve all Objects stored in this storage, filtered by the given collection name
getStreamByResource ( PersistentResource $resource ) : resource | boolean Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.
getStreamByResourcePath ( string $relativePath ) : resource | boolean Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.
initializeObject ( ) : void Initializes this resource storage

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

Метод Описание
getStoragePathAndFilenameByHash ( string $sha1Hash ) : string Determines and returns the absolute path and filename for a storage file identified by the given SHA1 hash.

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

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

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

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

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

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

Retrieve all Objects stored in this storage.
public getObjects ( callable $callback = null ) : Generator
$callback callable Function called after each iteration
Результат Generator

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

Retrieve all Objects stored in this storage, filtered by the given collection name
public getObjectsByCollection ( Neos\Flow\ResourceManagement\CollectionInterface $collection, callable $callback = null ) : Generator
$collection Neos\Flow\ResourceManagement\CollectionInterface
$callback callable Function called after each iteration
Результат Generator

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

This function assures a nested directory structure in order to avoid thousands of files in a single directory which may result in performance problems in older file systems such as ext2, ext3 or NTFS.
protected getStoragePathAndFilenameByHash ( string $sha1Hash ) : string
$sha1Hash string The SHA1 hash identifying the stored resource
Результат string The path and filename, for example "/var/www/mysite.com/Data/Persistent/c/8/2/8/c828d0f88ce197be1aff7cc2e5e86b1244241ac6"

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

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.
public getStreamByResource ( PersistentResource $resource ) : resource | boolean
$resource Neos\Flow\ResourceManagement\PersistentResource The resource stored in this storage
Результат resource | boolean | boolean The resource stream or FALSE if the stream could not be obtained

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

Returns a stream handle which can be used internally to open / copy the given resource stored in this storage.
public getStreamByResourcePath ( string $relativePath ) : resource | boolean
$relativePath string A path relative to the storage root, for example "MyFirstDirectory/SecondDirectory/Foo.css"
Результат resource | boolean | boolean A URI (for example the full path and filename) leading to the resource file or FALSE if it does not exist

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

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

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

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

protected Environment,Neos\Flow\Utility $environment
Результат Neos\Flow\Utility\Environment

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

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

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

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

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

protected ResourceManager,Neos\Flow\ResourceManagement $resourceManager
Результат Neos\Flow\ResourceManagement\ResourceManager

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

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