PHP Класс Neos\ContentRepository\Domain\Service\Cache\FirstLevelNodeCache

The caching of multiple nodes below a certain path is possible as well, using the *ChildNodesByPathAndNodeTypeFilter() methods.
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$childNodesByPathAndNodeTypeFilter array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$nodesByIdentifier array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$nodesByPath array<\Neos\ContentRepository\Domain\Model\NodeInterface>

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

Метод Описание
flush ( ) : void Flush the cache.
getByIdentifier ( string $identifier ) : Neos\ContentRepository\Domain\Model\NodeInterface | boolean If the cache contains a node with the given identifier, it is returned.
getByPath ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface If the cache contains a node for the given path, it is returned.
getChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter ) : boolean Returns the cached child nodes for the given path and node type filter.
setByIdentifier ( string $identifier, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void Adds the given node to the cache for the given identifier. The node will also be added with is's path.
setByPath ( string $path, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void Adds the given node to the cache for the given path. The node will also be added under it's identifier.
setChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter, array $nodes ) : void Sets the given nodes as child nodes for the given path and node type filter.

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

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

Flush the cache.
public flush ( ) : void
Результат void

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

Otherwise FALSE is returned.
public getByIdentifier ( string $identifier ) : Neos\ContentRepository\Domain\Model\NodeInterface | boolean
$identifier string
Результат Neos\ContentRepository\Domain\Model\NodeInterface | boolean

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

Otherwise FALSE is returned.
public getByPath ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface
$path string
Результат Neos\ContentRepository\Domain\Model\NodeInterface

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

Returns the cached child nodes for the given path and node type filter.
public getChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter ) : boolean
$path string
$nodeTypeFilter string
Результат boolean

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

Adds the given node to the cache for the given identifier. The node will also be added with is's path.
public setByIdentifier ( string $identifier, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void
$identifier string
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

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

Adds the given node to the cache for the given path. The node will also be added under it's identifier.
public setByPath ( string $path, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void
$path string
$node Neos\ContentRepository\Domain\Model\NodeInterface
Результат void

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

The nodes will each be added with their path and identifier as well.
public setChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter, array $nodes ) : void
$path string
$nodeTypeFilter string
$nodes array
Результат void

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

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

protected array<\Neos\ContentRepository\Domain\Model\NodeInterface> $childNodesByPathAndNodeTypeFilter
Результат array<\Neos\ContentRepository\Domain\Model\NodeInterface>

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

protected array<\Neos\ContentRepository\Domain\Model\NodeInterface> $nodesByIdentifier
Результат array<\Neos\ContentRepository\Domain\Model\NodeInterface>

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

protected array<\Neos\ContentRepository\Domain\Model\NodeInterface> $nodesByPath
Результат array<\Neos\ContentRepository\Domain\Model\NodeInterface>