TYPO3 CMS  TYPO3_6-2
PhpFrontend.php
Go to the documentation of this file.
1 <?php
3 
25 
32  public function __construct($identifier, \TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface $backend) {
33  parent::__construct($identifier, $backend);
34  }
35 
48  public function set($entryIdentifier, $sourceCode, array $tags = array(), $lifetime = NULL) {
49  if (!$this->isValidEntryIdentifier($entryIdentifier)) {
50  throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1264023823);
51  }
52  if (!is_string($sourceCode)) {
53  throw new \TYPO3\CMS\Core\Cache\Exception\InvalidDataException('The given source code is not a valid string.', 1264023824);
54  }
55  foreach ($tags as $tag) {
56  if (!$this->isValidTag($tag)) {
57  throw new \InvalidArgumentException('"' . $tag . '" is not a valid tag for a cache entry.', 1264023825);
58  }
59  }
60  $sourceCode = '<?php' . chr(10) . $sourceCode . chr(10) . '#';
61  $this->backend->set($entryIdentifier, $sourceCode, $tags, $lifetime);
62  }
63 
71  public function requireOnce($entryIdentifier) {
72  return $this->backend->requireOnce($entryIdentifier);
73  }
74 
75 }
__construct($identifier, \TYPO3\CMS\Core\Cache\Backend\PhpCapableBackendInterface $backend)
Definition: PhpFrontend.php:32