本文整理匯總了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;
}