// reference to actions handler\r
public $handler;\r
\r
+ // reference to an instance of Skin class\r
+ public $skin = NULL;\r
+ \r
// delimiters that can be used for skin/templatevars\r
public $delim;\r
\r
* Creates a new parser object with the given allowed actions\r
* and the given handler\r
*\r
- * @param $allowedActions array\r
* @param $handler class object with functions for each action (reference)\r
* @param $delim optional delimiter\r
* @param $paramdelim optional parameterdelimiter\r
*/\r
- public function __construct($allowedActions, &$handler, $delim = '(<%|%>)', $pdelim = ',')\r
+ public function __construct( &$handler, $delim = '(<%|%>)', $pdelim = ',')\r
{\r
- $this->actions = $allowedActions;\r
- $this->handler =& $handler;\r
- $this->delim = $delim;\r
- $this->pdelim = $pdelim;\r
+ $this->handler = &$handler;\r
+ $this->actions = $handler->getAvailableActions();\r
+ $this->delim = $delim;\r
+ $this->pdelim = $pdelim;\r
$this->norestrictions = 0; // set this to 1 to disable checking for allowedActions\r
+ \r
+ $this->skin = NULL;\r
+ \r
+ $handler->setParser($this);\r
+ \r
return;\r
}\r
\r
}\r
\r
/**\r
+ * Parser::setSkin()\r
+ * Set the skin\r
+ * @param object $skin an instance of Skin class\r
+ * @return void\r
+ */\r
+ public function setSkin(&$skin)\r
+ {\r
+ $this->skin = &$skin;\r
+ return;\r
+ }\r
+ \r
+ /**\r
* Parser::setProperty()\r
* Set a property of the parser in the manager\r
* \r