Files
smarty/tests/UnitTests/ResourceTests/ResourcePlugins/PHPunitplugins/resource.db3.php
Jonathan Lelievre bf87aee3f0 Add PHP 8.4 support to Smarty (#1084)
* Add nullable types

* Removing deprecated E_STRICT constant from test suite.

* Added PHP 8.4 RC1 as test image

* PHP version bump in the README.md.

* Added PHP 8.4 to CI

* Add running tests for PHP 8.4
2024-11-21 23:04:22 +01:00

33 lines
826 B
PHP

<?php
/*
* Smarty plugin
* -------------------------------------------------------------
* File: resource.db3.php
* Type: resource
* Name: db
* Purpose: Fetches templates from a database
* -------------------------------------------------------------
*/
class Smarty_Resource_Db3 extends Smarty_Resource
{
public function populate(Smarty_Template_Source $source, ?Smarty_Internal_Template $_template = null)
{
$source->filepath = 'db3:';
$source->uid = sha1($source->resource);
$source->timestamp = 0;
$source->exists = true;
}
public function getContent(Smarty_Template_Source $source)
{
return '{$x="hello world"}{$x}';
}
public function getCompiledFilepath(Smarty_Internal_Template $_template)
{
return false;
}
}