cvs: pear /Text_Wiki/Text Wiki.php /Text_Wiki/doc test_Text_Wiki.php
| From: | Justin Patrin | Date: | Wed, 01 Mar 2006 15:43:22 +0000 |
| Subject: | cvs: pear /Text_Wiki/Text Wiki.php /Text_Wiki/doc test_Text_Wiki.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-38791@lists.php.net to get a copy of this message | ||
justinpatrin Wed Mar 1 15:43:22 2006 UTC
Modified files:
/pear/Text_Wiki/Text Wiki.php
/pear/Text_Wiki/doc test_Text_Wiki.php
Log:
Revert rename of singleton
http://cvs.php.net/viewcvs.cgi/pear/Text_Wiki/Text/Wiki.php?r1=1.40&r2=1.41&diff_format=u
Index: pear/Text_Wiki/Text/Wiki.php
diff -u pear/Text_Wiki/Text/Wiki.php:1.40 pear/Text_Wiki/Text/Wiki.php:1.41
--- pear/Text_Wiki/Text/Wiki.php:1.40 Tue Feb 28 05:08:29 2006
+++ pear/Text_Wiki/Text/Wiki.php Wed Mar 1 15:43:21 2006
@@ -9,7 +9,7 @@
* @package Text_Wiki
* @author Paul M. Jones <pmjones@php.net>
* @license http://www.gnu.org/copyleft/lesser.html LGPL
License 2.1
- * @version CVS: $Id: Wiki.php,v 1.40 2006/02/28 05:08:29 toggg Exp $
+ * @version CVS: $Id: Wiki.php,v 1.41 2006/03/01 15:43:21 justinpatrin Exp $
* @link http://pear.php.net/package/Text_Wiki
*/
@@ -345,7 +345,7 @@
* @param array $rules The set of rules to load for this object. Defaults
* to null, which will load the default ruleset for this parser.
* @param string $parser The parser to be used (defaults to 'Default').
- * For non-Default parsers, consider using the mill() method instead
+ * For non-Default parsers, consider using the singleton() method instead
* as the fetching of the rulesets from non-Default parsers causes an
* extra object instantiation, which is slower.
*/
@@ -388,17 +388,17 @@
}
/**
- * mill.
+ * Singleton.
*
* This avoids instantiating multiple Text_Wiki instances where a number
* of objects are required in one call, e.g. to save memory in a
* CMS invironment where several parsers are required in a single page.
*
- * $single = & mill();
+ * $single = & singleton();
*
* or
*
- * $single = & mill( array('Prefilter', 'Delimiter', 'Code',
'Function',
+ * $single = & singleton( array('Prefilter', 'Delimiter',
'Code', 'Function',
* 'Html', 'Raw', 'Include', 'Embed',
'Anchor', 'Heading', 'Toc', 'Horiz',
* 'Break', 'Blockquote', 'List', 'Deflist',
'Table', 'Image', 'Phplookup',
* 'Center', 'Newline', 'Paragraph', 'Url',
'Freelink', 'Interwiki', 'Wikilink',
@@ -412,7 +412,7 @@
* After calling this, call $single->setParseConf(), setRenderConf() or setFormatConf()
* as usual for a constructed object of this class.
*
- * The internal static array of mill objects has no index on the parser
+ * The internal static array of singleton objects has no index on the parser
* rules, the only index is on the parser name. So if you call this multiple
* times with different rules but the same parser name, you will get the same
* static parser object each time.
@@ -424,7 +424,7 @@
* @param string $parser The parser to be used (defaults to 'Default').
* @return &object a reference to the Text_Wiki unique instantiation.
*/
- function &mill($rules = null, $parser = 'Default')
+ function &singleton($rules = null, $parser = 'Default')
{
static $only = array();
if (!isset($only[$parser])) {
http://cvs.php.net/viewcvs.cgi/pear/Text_Wiki/doc/test_Text_Wiki.php?r1=1.16&r2=1.17&diff_format=u
Index: pear/Text_Wiki/doc/test_Text_Wiki.php
diff -u pear/Text_Wiki/doc/test_Text_Wiki.php:1.16 pear/Text_Wiki/doc/test_Text_Wiki.php:1.17
--- pear/Text_Wiki/doc/test_Text_Wiki.php:1.16 Tue Feb 28 05:08:29 2006
+++ pear/Text_Wiki/doc/test_Text_Wiki.php Wed Mar 1 15:43:21 2006
@@ -7,7 +7,7 @@
require_once 'Text/Wiki.php';
/**
* Eventually set an include path if all parsers/renderers not installed
- * $Id: test_Text_Wiki.php,v 1.16 2006/02/28 05:08:29 toggg Exp $
+ * $Id: test_Text_Wiki.php,v 1.17 2006/03/01 15:43:21 justinpatrin Exp $
*/
$parser = $render = $source = '';
$plist = array('Default', 'BBCode', 'Cowiki', 'Doku',
'Mediawiki', 'Tiki');
@@ -53,13 +53,13 @@
}
// instantiate a Text_Wiki object from the given class
-$wiki = & Text_Wiki::mill(null, $parser);
+$wiki = & Text_Wiki::singleton(null, $parser);
// Wiki.php 1.37 and prior, use this:
-#$wiki = & Text_Wiki::mill($parser);
+#$wiki = & Text_Wiki::singleton($parser);
// include this line of code instead to test creating an object
-// using the constructor rather than the mill method.
+// using the constructor rather than the singleton method.
#$wiki = new Text_Wiki(null, $parser);
#print "<pre>\n";