本文整理汇总了PHP中Assets::is_modified_later方法的典型用法代码示例。如果您正苦于以下问题:PHP Assets::is_modified_later方法的具体用法?PHP Assets::is_modified_later怎么用?PHP Assets::is_modified_later使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Assets
的用法示例。
在下文中一共展示了Assets::is_modified_later方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: test_needs_recompile
public function test_needs_recompile()
{
$file = $this->data_dir() . 'js' . DIRECTORY_SEPARATOR . 'test.js';
$mtime = filemtime($file);
$this->assertTrue(Assets::is_modified_later($file, $mtime + 100));
$this->assertFalse(Assets::is_modified_later($file, $mtime - 100));
}
示例2: has_changed
/**
* Determine if file was modified later then source or it has changed
*
* @param string $file
* @param string $source_modified_time
* @param string $source_file
*
* @return bool
*/
public static function has_changed($file, $source_modified_time, $source_file)
{
return Assets::is_modified_later($file, $source_modified_time) or md5_file($file) != md5_file($source_file);
}
示例3: needs_recompile
/**
* Determine if recompilation is needed
*
* @return bool
*/
public function needs_recompile()
{
return Assets::is_modified_later($this->destination_file(), $this->last_modified());
}
示例4: needs_recompile
/**
* Determine if recompilation is needed
*
* @return bool
*/
public function needs_recompile()
{
// Always compile less files in development environment since an included file may have been changed.
return Assets::is_modified_later($this->destination_file(), $this->last_modified()) or in_array('less', $this->_engines) and Kohana::$environment == Kohana::DEVELOPMENT;
}