Gaufrette\Adapter\InMemory::read PHP Method

read() public method

public read ( $key )
    public function read($key)
    {
        return $this->files[$key]['content'];
    }

Usage Example

Beispiel #1
0
 public function testSetFiles()
 {
     $adapter = new InMemory(array('foo' => 'Foo content', 'bar' => 'Bar content'));
     $this->assertFalse($adapter->exists('foobar'));
     $this->assertTrue($adapter->exists('foo'));
     $this->assertEquals('Foo content', $adapter->read('foo'));
     $this->assertTrue($adapter->exists('bar'));
     $this->assertEquals('Bar content', $adapter->read('bar'));
 }
All Usage Examples Of Gaufrette\Adapter\InMemory::read