Changeset 742
- Timestamp:
- 06/21/07 16:49:13 (1 year ago)
- Files:
-
- trunk/config/xml/cache.xml (added)
- trunk/src/main/php/net/stubbles/util/cache/stubAbstractCacheContainer.php (modified) (2 diffs)
- trunk/src/main/php/net/stubbles/util/cache/stubCache.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/cache/stubCacheContainer.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/cache/stubCacheInitializer.php (added)
- trunk/src/main/php/net/stubbles/util/cache/stubCacheStrategy.php (modified) (1 diff)
- trunk/src/main/php/net/stubbles/util/cache/stubCacheXJConfInitializer.php (added)
- trunk/src/main/php/net/stubbles/util/cache/stubDefaultCacheStrategy.php (modified) (1 diff)
- trunk/src/main/resources/xjconf/cache.xml (added)
- trunk/src/test/php/net/stubbles/integration/CacheTestCase.php (added)
- trunk/src/test/php/net/stubbles/util/cache/stubAbstractCacheContainerTestCase.php (modified) (1 diff)
- trunk/src/test/php/net/stubbles/util/cache/stubFileCacheContainerTestCase.php (modified) (1 diff)
- trunk/src/test/runIntegration.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/main/php/net/stubbles/util/cache/stubAbstractCacheContainer.php
r741 r742 13 13 * @subpackage util_cache 14 14 */ 15 abstract class stubAbstractCacheContainer extends stub BaseObject15 abstract class stubAbstractCacheContainer extends stubSerializableObject 16 16 { 17 17 /** … … 38 38 * 39 39 * @param string $id id of the container 40 * @param stubCacheStrategy $strategy strategy the container should use 41 */ 42 public function __construct($id, stubCacheStrategy $strategy) 43 { 44 $this->id = $id; 45 $this->strategy = $strategy; 40 */ 41 public function __construct($id) 42 { 43 $this->id = $id; 46 44 } 47 45 trunk/src/main/php/net/stubbles/util/cache/stubCache.php
r738 r742 63 63 return isset(self::$containers[$id]); 64 64 } 65 66 /** 67 * returns a list of all container ids 68 * 69 * @return array<string> 70 */ 71 public static function getContainerIds() 72 { 73 return array_keys(self::$containers); 74 } 65 75 } 66 76 ?> trunk/src/main/php/net/stubbles/util/cache/stubCacheContainer.php
r741 r742 14 14 * @subpackage util_cache 15 15 */ 16 interface stubCacheContainer extends stubObject 16 interface stubCacheContainer extends stubObject, stubSerializable 17 17 { 18 18 /** trunk/src/main/php/net/stubbles/util/cache/stubCacheStrategy.php
r741 r742 14 14 * @subpackage util_cache 15 15 */ 16 interface stubCacheStrategy extends stubObject 16 interface stubCacheStrategy extends stubObject, stubSerializable 17 17 { 18 18 /** trunk/src/main/php/net/stubbles/util/cache/stubDefaultCacheStrategy.php
r741 r742 14 14 * @subpackage util_cache 15 15 */ 16 class stubDefaultCacheStrategy extends stub BaseObject implements stubCacheStrategy16 class stubDefaultCacheStrategy extends stubSerializableObject implements stubCacheStrategy 17 17 { 18 18 /** trunk/src/test/php/net/stubbles/util/cache/stubAbstractCacheContainerTestCase.php
r741 r742 98 98 { 99 99 $this->mockCacheStrategy = new MockstubCacheStrategy(); 100 $this->cacheContainer = new TeststubAbstractCacheContainer('foo', $this->mockCacheStrategy); 100 $this->cacheContainer = new TeststubAbstractCacheContainer('foo'); 101 $this->cacheContainer->setStrategy($this->mockCacheStrategy); 101 102 } 102 103 trunk/src/test/php/net/stubbles/util/cache/stubFileCacheContainerTestCase.php
r741 r742 43 43 $this->cacheDirectory = TEST_SRC_PATH . '/tmp/util_cache'; 44 44 $this->mockCacheStrategy = new MockstubCacheStrategy(); 45 $this->cacheContainer = new stubFileCacheContainer('foo', $this->mockCacheStrategy); 45 $this->cacheContainer = new stubFileCacheContainer('foo'); 46 $this->cacheContainer->setStrategy($this->mockCacheStrategy); 46 47 $this->cacheContainer->setCacheDirectory($this->cacheDirectory); 47 48 $this->cacheDirectory .= '/foo'; trunk/src/test/runIntegration.php
r740 r742 32 32 33 33 $testSuite->addTestFile(TEST_SRC_PATH . '/php/net/stubbles/integration/AnnotationTestCase.php'); 34 $testSuite->addTestFile(TEST_SRC_PATH . '/php/net/stubbles/integration/CacheTestCase.php'); 34 35 $testSuite->addTestFile(TEST_SRC_PATH . '/php/net/stubbles/integration/DatabaseTestCase.php'); 35 36 $testSuite->addTestFile(TEST_SRC_PATH . '/php/net/stubbles/integration/InterceptorTestCase.php');
