public function testForcePHPArrayFlag() { ArrayFactory::setForcePHPArray(false); $this->assertInstanceOf('\\Limcache\\storage\\JudyArray', ArrayFactory::createArray(ArrayFactory::STRING_TO_MIXED)); ArrayFactory::setForcePHPArray(true); $this->assertInstanceOf('\\Limcache\\storage\\PHPArray', ArrayFactory::createArray(ArrayFactory::STRING_TO_MIXED)); }
/** * @param EvictionStrategyInterface */ public function __construct(EvictionStrategyInterface $strategy) { $this->strategy = $strategy; $this->cache = ArrayFactory::createArray(ArrayFactory::STRING_TO_MIXED); }
public function __construct($size) { $this->size = $size; $this->keys = ArrayFactory::createArray(ArrayFactory::INT_TO_MIXED); $this->indexes = ArrayFactory::createArray(ArrayFactory::STRING_TO_INT); }