*/
// Load Smarty Template support
- require (GLM_PROTO_PLUGIN_DIR . '/lib/smartyTemplateSupport.php');
- $smarty = new smartyTemplateSupport();
+ require (GLM_PROTO_PLUGIN_DIR . '/lib/smartyPrototypeTemplateSupport.php');
+ $smarty = new smartyPrototypeTemplateSupport();
// Add some standard parameters
$smarty->templateAssign('request_uri', $_SERVER['REQUEST_URI']);
--- /dev/null
+<?php
+
+/**
+ * Gaslight Media Prototype Management and Display
+ * Smarty Templates Support Class
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmPrototypeManagement
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ */
+
+/*
+ * This class loads, instatiates, and configures Smarty Templates for this
+ * plugin.
+ *
+ * This class should be extended with the class that will need to use Smarty.
+ * This
+ * will make the $template object available to the class extending this one as
+ * $this->template.
+ *
+ * The templateAssign() method simplifies adding parameters to the template.
+ *
+ * To use this class you must execute the following. No need to assign the
+ * result.
+ *
+ * new smartyTemplateSupport();
+ *
+ */
+class smartyPrototypeTemplateSupport {
+
+ /**
+ * Smarty Template Object
+ *
+ * @var $template
+ * @access public
+ */
+ public $template;
+
+ /*
+ * Smarty Template Support Constructor
+ *
+ * This constructor loads and instatiates smarty templates, then adds some
+ * standard template parameters.
+ *
+ * @return object Class object
+ *
+ */
+ public function __construct() {
+
+ /*
+ * Load and instatiate Smarty Templates
+ */
+ require (GLM_PROTO_PLUGIN_DIR . '/lib/Smarty-3.1.21/libs/Smarty.class.php');
+
+ $this->template = new Smarty ();
+
+ /*
+ * Configure Smarty Templates for this site
+ */
+ $this->template->setTemplateDir ( GLM_PROTO_PLUGIN_DIR . '/views' );
+ $this->template->setCompileDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/templates_c' );
+ $this->template->setCacheDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/cache' );
+ $this->template->setConfigDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/configs' );
+ }
+
+ /*
+ * Assign parameters to the template
+ *
+ * This method assigns either one parameter to the template object in this
+ * class or an array of parameters.
+ *
+ * Submit an array of parameters to the template.
+ *
+ * @name array Array of arrays with parameter name (key), value pairs
+ *
+ * or
+ *
+ * Submit one parameter to the template
+ *
+ * @param text parameter name
+ * @param {whatever} parameter value
+ *
+ * @return void
+ */
+ public function templateAssign($param, $value = null) {
+
+ // If this is a single assignment
+ if ($value !== null) {
+ $this->template->assign ( $param, $value );
+
+ // Otherwise it's an array of parameter/value pairs
+ } elseif (is_array ( $param )) {
+
+ while ( list ( $key, $value ) = each ( $param ) ) {
+ $this->template->assign ( $key, $value );
+ }
+ }
+ }
+}
+
+?>
\ No newline at end of file
+++ /dev/null
-<?php
-
-/**
- * Gaslight Media Prototype Management and Display
- * Smarty Templates Support Class
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package glmPrototypeManagement
- * @author Chuck Scott <cscott@gaslightmedia.com>
- * @license http://www.gaslightmedia.com Gaslightmedia
- */
-
-/*
- * This class loads, instatiates, and configures Smarty Templates for this
- * plugin.
- *
- * This class should be extended with the class that will need to use Smarty.
- * This
- * will make the $template object available to the class extending this one as
- * $this->template.
- *
- * The templateAssign() method simplifies adding parameters to the template.
- *
- * To use this class you must execute the following. No need to assign the
- * result.
- *
- * new smartyTemplateSupport();
- *
- */
-class smartyTemplateSupport {
-
- /**
- * Smarty Template Object
- *
- * @var $template
- * @access public
- */
- public $template;
-
- /*
- * Smarty Template Support Constructor
- *
- * This constructor loads and instatiates smarty templates, then adds some
- * standard template parameters.
- *
- * @return object Class object
- *
- */
- public function __construct() {
-
- /*
- * Load and instatiate Smarty Templates
- */
- require (GLM_PROTO_PLUGIN_DIR . '/lib/Smarty-3.1.21/libs/Smarty.class.php');
-
- $this->template = new Smarty ();
-
- /*
- * Configure Smarty Templates for this site
- */
- $this->template->setTemplateDir ( GLM_PROTO_PLUGIN_DIR . '/views' );
- $this->template->setCompileDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/templates_c' );
- $this->template->setCacheDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/cache' );
- $this->template->setConfigDir ( GLM_PROTO_PLUGIN_DIR . '/misc/smarty/configs' );
- }
-
- /*
- * Assign parameters to the template
- *
- * This method assigns either one parameter to the template object in this
- * class or an array of parameters.
- *
- * Submit an array of parameters to the template.
- *
- * @name array Array of arrays with parameter name (key), value pairs
- *
- * or
- *
- * Submit one parameter to the template
- *
- * @param text parameter name
- * @param {whatever} parameter value
- *
- * @return void
- */
- public function templateAssign($param, $value = null) {
-
- // If this is a single assignment
- if ($value !== null) {
- $this->template->assign ( $param, $value );
-
- // Otherwise it's an array of parameter/value pairs
- } elseif (is_array ( $param )) {
-
- while ( list ( $key, $value ) = each ( $param ) ) {
- $this->template->assign ( $key, $value );
- }
- }
- }
-}
-
-?>
\ No newline at end of file