public setTimestamp ( |
||
$build | The name of the build to set a timestamp for. | |
$time | integer | The timestamp. |
return | void |
public function setTimestamp(AssetTarget $build, $time)
{
$ext = $build->ext();
if (empty($this->timestamp[$ext])) {
return;
}
$data = $this->_readTimestamp();
$name = $this->buildCacheName($build);
$data[$name] = $time;
$this->_writeTimestamp($data);
}
public function testGetSetTimestamp() { $writer = new AssetWriter(['js' => true, 'css' => false], TMP); $time = time(); $writer->setTimestamp($this->target, $time); $result = $writer->getTimestamp($this->target); $this->assertEquals($time, $result); }