PHP Class Neos\Fusion\Core\Cache\CacheSegmentParser

Show file Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$cacheEntries array
$output string

Public Methods

Method Description
extractRenderedSegments ( string $content, string $randomCacheMarker = '' ) : string Parses the given content and extracts segments by searching for start end end markers. Those segments can later be retrieved via getCacheSegments() and stored in a cache.
getCacheSegments ( ) : array Returns an array with extracted content segments, including the type (if they can be cached or not) and tags to be used for their entries when the segments are stored in a persistent cache.
getOutput ( ) : string Returns the fully intact content as originally given to extractRenderedSegments() but without the markers. This content is suitable for being used as output for the user.

Method Details

extractRenderedSegments() public method

This method also prepares a cleaned up output which can be retrieved later. See getOutput() for more information.
public extractRenderedSegments ( string $content, string $randomCacheMarker = '' ) : string
$content string The content to process, ie. the rendered content with some segment markers already in place
$randomCacheMarker string A random cache marker that should be used to "protect" against content containing special characters used to mark cache segments
return string The outer content with placeholders instead of the actual content segments

getCacheSegments() public method

Returns an array with extracted content segments, including the type (if they can be cached or not) and tags to be used for their entries when the segments are stored in a persistent cache.
public getCacheSegments ( ) : array
return array

getOutput() public method

Returns the fully intact content as originally given to extractRenderedSegments() but without the markers. This content is suitable for being used as output for the user.
public getOutput ( ) : string
return string

Property Details

$cacheEntries protected property

protected array $cacheEntries
return array

$output protected property

protected string $output
return string