BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Resource Namespace Reference

Detailed Description

Extends All Resource Resource Implementation modifying the extends-Resource to walk through the template_dirs and inherit all templates of the same name

-examples

Author
Rodney Rehm

MySQL Resource Resource Implementation based on the Custom API to use MySQL as the storage resource for Smarty's templates and configs. Table definition:

CREATE TABLE IF NOT EXISTS `templates` (
  `name` varchar(100) NOT NULL,
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `source` text,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Demo data:

INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');

-examples

Author
Rodney Rehm

MySQL Resource Resource Implementation based on the Custom API to use MySQL as the storage resource for Smarty's templates and configs. Note that this MySQL implementation fetches the source and timestamps in a single database query, instead of two separate like resource.mysql.php does. Table definition:

CREATE TABLE IF NOT EXISTS `templates` (
  `name` varchar(100) NOT NULL,
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `source` text,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Demo data:

INSERT INTO `templates` (`name`, `modified`, `source`) VALUES ('test.tpl', "2010-12-25 22:00:00", '{$x="hello world"}{$x}');

-examples

Author
Rodney Rehm