mirror of
https://github.com/smarty-php/smarty.git
synced 2026-01-31 18:49:32 +01:00
* 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
28 lines
725 B
PHP
28 lines
725 B
PHP
<?php
|
|
|
|
/*
|
|
* Smarty plugin
|
|
* -------------------------------------------------------------
|
|
* File: resource.db2.php
|
|
* Type: resource
|
|
* Name: db
|
|
* Purpose: Fetches templates from a database
|
|
* -------------------------------------------------------------
|
|
*/
|
|
|
|
class Smarty_Resource_Db2 extends Smarty_Resource_Recompiled
|
|
{
|
|
public function populate(Smarty_Template_Source $source, ?Smarty_Internal_Template $_template = null)
|
|
{
|
|
$source->filepath = 'db2:';
|
|
$source->uid = sha1($source->resource);
|
|
$source->timestamp = 0;
|
|
$source->exists = true;
|
|
}
|
|
|
|
public function getContent(Smarty_Template_Source $source)
|
|
{
|
|
return '{$x="hello world"}{$x}';
|
|
}
|
|
}
|