PHP 클래스 Neos\Flow\ResourceManagement\Storage\FileSystemStorage

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

보호된 프로퍼티들

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