2020-04-13 15:30:52 +02:00
|
|
|
<?php
|
2022-12-22 21:50:01 +01:00
|
|
|
|
|
|
|
|
use Smarty\Exception;
|
|
|
|
|
|
2020-04-13 15:30:52 +02:00
|
|
|
require_once SMARTY_DIR . '../demo/plugins/resource.mysqls.php';
|
|
|
|
|
|
2022-12-21 16:33:26 +01:00
|
|
|
class Smarty_Resource_Mysqlstest extends _MysqlsPlugin
|
2020-04-13 15:30:52 +02:00
|
|
|
{
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
try {
|
|
|
|
|
$this->db = PHPUnit_Smarty::$pdo;
|
|
|
|
|
}
|
|
|
|
|
catch
|
|
|
|
|
(PDOException $e) {
|
2022-12-22 21:50:01 +01:00
|
|
|
throw new Exception('Mysql Resource failed: ' . $e->getMessage());
|
2020-04-13 15:30:52 +02:00
|
|
|
}
|
|
|
|
|
$this->fetch = $this->db->prepare('SELECT modified, source FROM templates WHERE name = :name');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|