Gaufrette\Adapter\InMemory::mtime PHP Method

mtime() public method

public mtime ( $key )
    public function mtime($key)
    {
        return isset($this->files[$key]['mtime']) ? $this->files[$key]['mtime'] : false;
    }

Usage Example

Esempio n. 1
0
 public function testLastModifiedTimeIsUpdatedOnWrite()
 {
     $adapter = new InMemory(array('foobar' => array('content' => 'Some content', 'mtime' => 123456789)));
     $time = time();
     $adapter->write('foobar', 'Changed content');
     $this->assertTrue(in_array($adapter->mtime('foobar'), array($time, $time + 1)));
 }