‪TYPO3CMS  ‪main
TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture Class Reference
Inheritance diagram for TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture:
TYPO3\CMS\Core\Cache\Frontend\FrontendInterface TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendBackendInstanceFixture TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendDefaultFixture TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendIdentifierFixture TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendInitializeObjectFixture

Public Member Functions

 __construct ($identifier)
 
 getIdentifier ()
 
 getBackend ()
 
 set ($entryIdentifier, $data, array $tags=[], $lifetime=null)
 
 get ($entryIdentifier)
 
 has ($entryIdentifier)
 
 remove ($entryIdentifier)
 
 flush ()
 
 flushByTag ($tag)
 
 flushByTags (array $tags)
 
 collectGarbage ()
 
 isValidEntryIdentifier ($identifier)
 
 isValidTag ($tag)
 

Protected Attributes

string $identifier
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
const TAG_CLASS = '%CLASS%'
 
const TAG_PACKAGE = '%PACKAGE%'
 
const PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'
 
const PATTERN_TAG = '/^[a-zA-Z0-9_%\\-&]{1,250}$/'
 

Detailed Description

Definition at line 22 of file FrontendFixture.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::__construct (   $identifier)

Member Function Documentation

◆ collectGarbage()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::collectGarbage ( )

Does garbage collection

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 62 of file FrontendFixture.php.

◆ flush()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::flush ( )

Removes all cache entries of this cache.

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 56 of file FrontendFixture.php.

◆ flushByTag()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::flushByTag (   $tag)

Removes all cache entries of this cache which are tagged by the specified tag.

Parameters
string$tag‪The tag the entries must have

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 58 of file FrontendFixture.php.

◆ flushByTags()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::flushByTags ( array  $tags)

Removes all cache entries of this cache which are tagged by any of the specified tags.

Parameters
string[]$tags‪List of tags

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 60 of file FrontendFixture.php.

◆ get()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::get (   $entryIdentifier)

Finds and returns data from the cache.

Parameters
string$entryIdentifier‪Something which identifies the cache entry - depends on concrete cache
Returns
‪mixed

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 44 of file FrontendFixture.php.

◆ getBackend()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::getBackend ( )

Returns the backend used by this cache

Returns
‪\TYPO3\CMS\Core\Cache\Backend\BackendInterface The backend used by this cache

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 36 of file FrontendFixture.php.

◆ getIdentifier()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::getIdentifier ( )

Returns this cache's identifier

Returns
‪string The identifier for this cache

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 31 of file FrontendFixture.php.

References TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture\$identifier.

◆ has()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::has (   $entryIdentifier)

Checks if a cache entry with the specified identifier exists.

Parameters
string$entryIdentifier‪An identifier specifying the cache entry
Returns
‪bool TRUE if such an entry exists, FALSE if not

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 46 of file FrontendFixture.php.

◆ isValidEntryIdentifier()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::isValidEntryIdentifier (   $identifier)

Checks the validity of an entry identifier. Returns TRUE if it's valid.

Parameters
string$identifier‪An identifier to be checked for validity
Returns
‪bool

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 64 of file FrontendFixture.php.

◆ isValidTag()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::isValidTag (   $tag)

Checks the validity of a tag. Returns TRUE if it's valid.

Parameters
string$tag‪A tag to be checked for validity
Returns
‪bool

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 69 of file FrontendFixture.php.

◆ remove()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::remove (   $entryIdentifier)

Removes the given cache entry from the cache.

Parameters
string$entryIdentifier‪An identifier specifying the cache entry
Returns
‪bool TRUE if such an entry exists, FALSE if not

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 51 of file FrontendFixture.php.

◆ set()

TYPO3\CMS\Core\Tests\Unit\Cache\Fixtures\FrontendFixture::set (   $entryIdentifier,
  $data,
array  $tags = [],
  $lifetime = null 
)

Saves data in the cache.

Parameters
string$entryIdentifier‪Something which identifies the data - depends on concrete cache
mixed$data‪The data to cache - also depends on the concrete cache implementation
array$tags‪Tags to associate with this cache entry
int$lifetime‪Lifetime of this cache entry in seconds. If NULL is specified, the default lifetime is used. "0" means unlimited lifetime.

Implements TYPO3\CMS\Core\Cache\Frontend\FrontendInterface.

Definition at line 42 of file FrontendFixture.php.

Member Data Documentation

◆ $identifier