includes/wikiformat.php
changeset 305 04f8250583e5
parent 297 4f0f987717c6
equal deleted inserted replaced
304:fc42bccc65e5 305:04f8250583e5
   152             }
   152             }
   153         }
   153         }
   154         
   154         
   155         chdir($d);
   155         chdir($d);
   156 
   156 
   157         $obj =& new $class($rules);
   157         $obj = new $class($rules);
   158         return $obj;
   158         return $obj;
   159     }
   159     }
   160 
   160 
   161     function setParseConf($rule, $arg1, $arg2 = null)
   161     function setParseConf($rule, $arg1, $arg2 = null)
   162     {
   162     {
   512                     "Parse rule '$rule' not found"
   512                     "Parse rule '$rule' not found"
   513                 );
   513                 );
   514             }
   514             }
   515         }
   515         }
   516 
   516 
   517         $this->parseObj[$rule] =& new $class($this);
   517         $this->parseObj[$rule] = new $class($this);
   518 
   518 
   519     }
   519     }
   520 
   520 
   521     function loadRenderObj($format, $rule)
   521     function loadRenderObj($format, $rule)
   522     {
   522     {
   534                     "Render rule '$rule' in format '$format' not found"
   534                     "Render rule '$rule' in format '$format' not found"
   535                 );
   535                 );
   536             }
   536             }
   537         }
   537         }
   538 
   538 
   539         $this->renderObj[$rule] =& new $class($this);
   539         $this->renderObj[$rule] = new $class($this);
   540     }
   540     }
   541 
   541 
   542     function loadFormatObj($format)
   542     function loadFormatObj($format)
   543     {
   543     {
   544         $format = ucwords(strtolower($format));
   544         $format = ucwords(strtolower($format));
   554                     "Rendering format class '$class' not found"
   554                     "Rendering format class '$class' not found"
   555                 );
   555                 );
   556             }
   556             }
   557         }
   557         }
   558 
   558 
   559         $this->formatObj[$format] =& new $class($this);
   559         $this->formatObj[$format] = new $class($this);
   560     }
   560     }
   561 
   561 
   562     function addPath($type, $dir)
   562     function addPath($type, $dir)
   563     {
   563     {
   564         $dir = $this->fixPath($dir);
   564         $dir = $this->fixPath($dir);