From: <var...@us...> - 2014-06-05 16:33:27
|
Revision: 8877 http://sourceforge.net/p/phpwiki/code/8877 Author: vargenau Date: 2014-06-05 16:33:24 +0000 (Thu, 05 Jun 2014) Log Message: ----------- Add methods visibility Modified Paths: -------------- trunk/lib/Template.php Modified: trunk/lib/Template.php =================================================================== --- trunk/lib/Template.php 2014-06-05 16:23:23 UTC (rev 8876) +++ trunk/lib/Template.php 2014-06-05 16:33:24 UTC (rev 8877) @@ -49,7 +49,7 @@ $this->_locals = array(); } - function _munge_input($template) + private function _munge_input($template) { // Convert < ?plugin expr ? > to < ?php $this->_printPluginPI("expr"); ? > @@ -67,7 +67,7 @@ return preg_replace($orig, $repl, $template); } - function _mungePlugin($pi) + private function _mungePlugin($pi) { // HACK ALERT: PHP's preg_replace, with the /e option seems to // escape both single and double quotes with backslashes. @@ -78,7 +78,7 @@ "'" . str_replace("'", "\'", $pi) . "'"); } - function _printPlugin($pi) + private function _printPlugin($pi) { include_once 'lib/WikiPlugin.php'; static $loader; @@ -89,7 +89,7 @@ $this->_print($loader->expandPI($pi, $this->_request, $this, $this->_basepage)); } - function _print($val) + private function _print($val) { if (isa($val, 'Template')) { $this->_expandSubtemplate($val); @@ -98,7 +98,7 @@ } } - function _expandSubtemplate(&$template) + private function _expandSubtemplate(&$template) { // FIXME: big hack! //if (!$template->_request) @@ -126,7 +126,7 @@ $this->_locals[$varname] = $value; } - function printExpansion($defaults = false) + public function printExpansion($defaults = false) { if (!is_array($defaults)) // HTML object or template object $defaults = array('CONTENT' => $defaults); @@ -158,7 +158,7 @@ // Find a way to do template expansion less memory intensive and faster. // 1.3.4 needed no memory at all for dumphtml, now it needs +15MB. // Smarty? As before? - function getExpansion($defaults = false) + public function getExpansion($defaults = false) { ob_start(); $this->printExpansion($defaults); @@ -167,18 +167,18 @@ return $xml; } - function printXML() + public function printXML() { $this->printExpansion(); } - function asXML() + public function asXML() { return $this->getExpansion(); } // Debugging: - function _dump_template() + private function _dump_template() { $lines = explode("\n", $this->_munge_input($this->_tmpl)); $pre = HTML::pre(); @@ -188,7 +188,7 @@ $pre->printXML(); } - function _errorHandler($error) + private function _errorHandler($error) { //if (!preg_match('/: eval\(\)\'d code$/', $error->errfile)) // return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |