final class ContentRepositoryRegistry (View source)

Properties

protected LoggerInterface $logger
protected ObjectManagerInterface $objectManager
protected SubgraphCachePool $subgraphCachePool

Methods

void
injectSettings(array $settings)

No description

get(ContentRepositoryId $contentRepositoryId)

This is the main entry point for Neos / Flow installations to fetch a content repository.

buildService(ContentRepositoryId $contentRepositoryId, ContentRepositoryServiceFactoryInterface $contentRepositoryServiceFactory)

Access content repository services.

void
resetFactoryInstance(ContentRepositoryId $contentRepositoryId)

No description

Details

void injectSettings(array $settings)

internal  for flow wiring and test cases only
 

No description

Parameters

array $settings

Return Value

void

ContentRepository get(ContentRepositoryId $contentRepositoryId)

This is the main entry point for Neos / Flow installations to fetch a content repository.

A content repository is not a singleton and must be fetched by its identifier.

To get a hold of a content repository identifier, it has to be passed along.

For Neos web requests, the current content repository can be inferred by the domain and the connected site: {\Neos\Neos\FrontendRouting\SiteDetection\SiteDetectionResult::fromRequest()} Or it has to be encoded manually as part of a query parameter.

For CLI applications, it's a necessity to specify the content repository as argument from the outside, generally via --content-repository default

The content repository identifier should never be hard-coded without being aware of its implications.

Hint: in case you are already in a service that is scoped to a content repository or a projection catchup hook, the content repository will likely be already available via e.g. the service factory.

Parameters

ContentRepositoryId $contentRepositoryId

Return Value

ContentRepository

Exceptions

InvalidConfigurationException

ContentRepositoryIds getContentRepositoryIds()

No description

Return Value

ContentRepositoryIds

ContentSubgraphInterface subgraphForNode(Node $node)

No description

Parameters

Node $node

Return Value

ContentSubgraphInterface

ContentRepositoryServiceInterface buildService(ContentRepositoryId $contentRepositoryId, ContentRepositoryServiceFactoryInterface $contentRepositoryServiceFactory)

Access content repository services.

The services are a low level extension mechanism and only few are part of the public API.

Parameters

ContentRepositoryId $contentRepositoryId
ContentRepositoryServiceFactoryInterface $contentRepositoryServiceFactory

Return Value

ContentRepositoryServiceInterface

Exceptions

InvalidConfigurationException

void resetFactoryInstance(ContentRepositoryId $contentRepositoryId)

internal  for test cases only
 

No description

Parameters

ContentRepositoryId $contentRepositoryId

Return Value

void