-
Notifications
You must be signed in to change notification settings - Fork 718
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- improvement impement workaround for HHVM PHP incompatibillity faceb…
- Loading branch information
Showing
10 changed files
with
63 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
/** | ||
* Smarty Extension Hhvm | ||
* | ||
* include patch for modified compiled or cached templates | ||
* HHVM does not check if file was modified when including same file multiple times | ||
* | ||
* @package Smarty | ||
* @subpackage PluginsInternal | ||
* @author Uwe Tews | ||
*/ | ||
class Smarty_Internal_Extension_Hhvm | ||
{ | ||
/** | ||
* @param \Smarty_Internal_Template $_template | ||
* @param string $file file name | ||
* | ||
* @return mixed | ||
*/ | ||
static function includeHhvm(Smarty_Internal_Template $_template, $file) | ||
{ | ||
$_smarty_tpl = $_template; | ||
$tmp_file = $_template->smarty->getCompileDir() . 'hhvm' . | ||
str_replace(array('.', ','), '_', uniqid(rand(), true)) . '.php'; | ||
file_put_contents($tmp_file, file_get_contents($file)); | ||
$result = @include $tmp_file; | ||
@unlink($tmp_file); | ||
return $result; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters