本文整理汇总了PHP中League\Flysystem\Filesystem::getCache方法的典型用法代码示例。如果您正苦于以下问题:PHP Filesystem::getCache方法的具体用法?PHP Filesystem::getCache怎么用?PHP Filesystem::getCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类League\Flysystem\Filesystem
的用法示例。
在下文中一共展示了Filesystem::getCache方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testNoop
public function testNoop()
{
$filesystem = new Filesystem(new Adapter\Local(__DIR__ . '/files'), new Cache\Noop());
$filesystem->write('test.txt', 'contents');
$this->assertTrue($filesystem->has('test.txt'));
$this->assertInternalType('array', $filesystem->listContents());
$this->assertInternalType('array', $filesystem->listContents('', true));
$cache = $filesystem->getCache();
$cache->setComplete('', false);
$cache->flush();
$cache->autosave();
$this->assertFalse($cache->isComplete('', false));
$this->assertFalse($cache->read('something'));
$this->assertFalse($cache->getMetadata('something'));
$this->assertFalse($cache->getMimetype('something'));
$this->assertFalse($cache->getSize('something'));
$this->assertFalse($cache->getTimestamp('something'));
$this->assertFalse($cache->getVisibility('something'));
$this->assertFalse($cache->listContents('', false));
$this->assertFalse($cache->rename('', ''));
$this->assertFalse($cache->copy('', ''));
$filesystem->delete('test.txt');
$this->assertEquals(array(), $cache->storeContents('unknwon', array(array('path' => 'some/file.txt')), false));
}