Inheritance: extends yii\web\View
 /**
  * @param string $resultFile
  * @return string
  */
 protected function prepareResultFile($resultFile)
 {
     $file = sprintf('%s%s', \Yii::getAlias($this->view->web_path), str_replace(\Yii::getAlias($this->view->base_path), '', $resultFile));
     $AssetManager = $this->view->getAssetManager();
     if ($AssetManager->appendTimestamp && ($timestamp = @filemtime($resultFile)) > 0) {
         $file .= "?v={$timestamp}";
     }
     return $file;
 }
示例#2
0
 public function testMainWithVersion()
 {
     $view = $this->getView();
     $view->assetManager->appendTimestamp = true;
     $this->assertInstanceOf(minify\View::className(), $view);
     $this->assertEquals('CP1251', $view->force_charset);
 }