OSDN Git Service

FIX:管理画面用スキンのsdincmodeをadminからskindirに
[nucleus-jp/nucleus-next.git] / nucleus / libs / PARSER.php
index 9c034a2..06f67cb 100644 (file)
@@ -33,6 +33,9 @@ class Parser
        // 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
@@ -47,18 +50,22 @@ class Parser
         * 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
@@ -151,6 +158,18 @@ class Parser
        }\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