cvs: pear /HTML_QuickForm2/QuickForm2 AbstractElement.php /HTML_QuickForm2/QuickForm2/Element Input.php /HTML_QuickForm2/tests/QuickForm2
AbstractElementTest.php ContainerTest.php ElementTest.php /HTML_QuickForm2/tests/QuickForm2/Element InputTest.php
| From: | Alexey Borzov | Date: | Mon, 16 Oct 2006 14:32:39 +0000 |
| Subject: | cvs: pear /HTML_QuickForm2/QuickForm2 AbstractElement.php /HTML_QuickForm2/QuickForm2/Element Input.php /HTML_QuickForm2/tests/QuickForm2 AbstractElementTest.php ContainerTest.php ElementTest.php /HTML_QuickForm2/tests/QuickForm2/Element InputTest.php |
||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-42591@lists.php.net to get a copy of this message | ||
avb Mon Oct 16 14:32:39 2006 UTC
Modified files:
/pear/HTML_QuickForm2/QuickForm2 AbstractElement.php
/pear/HTML_QuickForm2/QuickForm2/Element Input.php
/pear/HTML_QuickForm2/tests/QuickForm2 AbstractElementTest.php
ContainerTest.php
ElementTest.php
/pear/HTML_QuickForm2/tests/QuickForm2/Element InputTest.php
Log:
toHtml() -> __toString() (see latest changes to HTML_Common2)
include Exception.php in AbstractElement.php, we are throwing exceptions there
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm2/QuickForm2/AbstractElement.php?r1=1.4&r2=1.5&diff_format=u
Index: pear/HTML_QuickForm2/QuickForm2/AbstractElement.php
diff -u pear/HTML_QuickForm2/QuickForm2/AbstractElement.php:1.4
pear/HTML_QuickForm2/QuickForm2/AbstractElement.php:1.5
--- pear/HTML_QuickForm2/QuickForm2/AbstractElement.php:1.4 Fri Sep 8 14:02:45 2006
+++ pear/HTML_QuickForm2/QuickForm2/AbstractElement.php Mon Oct 16 14:32:38 2006
@@ -39,7 +39,7 @@
* @author Alexey Borzov <avb@php.net>
* @author Bertrand Mansion <golgote@mamasam.com>
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: AbstractElement.php,v 1.4 2006/09/08 14:02:45 avb Exp $
+ * @version CVS: $Id: AbstractElement.php,v 1.5 2006/10/16 14:32:38 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm2
*/
@@ -49,6 +49,11 @@
require_once 'HTML/Common2.php';
/**
+ * Exception classes for HTML_QuickForm2
+ */
+require_once 'HTML/QuickForm2/Exception.php';
+
+/**
* Abstract base class for all QuickForm2 Elements and Containers
*
* This class is mostly here to define the interface that should be implemented
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm2/QuickForm2/Element/Input.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/HTML_QuickForm2/QuickForm2/Element/Input.php
diff -u pear/HTML_QuickForm2/QuickForm2/Element/Input.php:1.1
pear/HTML_QuickForm2/QuickForm2/Element/Input.php:1.2
--- pear/HTML_QuickForm2/QuickForm2/Element/Input.php:1.1 Mon Sep 4 18:40:30 2006
+++ pear/HTML_QuickForm2/QuickForm2/Element/Input.php Mon Oct 16 14:32:38 2006
@@ -39,7 +39,7 @@
* @author Alexey Borzov <avb@php.net>
* @author Bertrand Mansion <golgote@mamasam.com>
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: Input.php,v 1.1 2006/09/04 18:40:30 avb Exp $
+ * @version CVS: $Id: Input.php,v 1.2 2006/10/16 14:32:38 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm2
*/
@@ -90,7 +90,7 @@
return $this->getAttribute('value');
}
- public function toHtml()
+ public function __toString()
{
if ($this->frozen) {
return $this->getFrozenHtml();
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm2/tests/QuickForm2/AbstractElementTest.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/HTML_QuickForm2/tests/QuickForm2/AbstractElementTest.php
diff -u pear/HTML_QuickForm2/tests/QuickForm2/AbstractElementTest.php:1.1
pear/HTML_QuickForm2/tests/QuickForm2/AbstractElementTest.php:1.2
--- pear/HTML_QuickForm2/tests/QuickForm2/AbstractElementTest.php:1.1 Thu Jul 6 19:33:44 2006
+++ pear/HTML_QuickForm2/tests/QuickForm2/AbstractElementTest.php Mon Oct 16 14:32:39 2006
@@ -38,7 +38,7 @@
* @package HTML_QuickForm2
* @author Alexey Borzov <avb@php.net>
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: AbstractElementTest.php,v 1.1 2006/07/06 19:33:44 avb Exp $
+ * @version CVS: $Id: AbstractElementTest.php,v 1.2 2006/10/16 14:32:39 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm2
*/
@@ -63,7 +63,7 @@
public function getType() { return 'concrete'; }
public function getValue() { return ''; }
public function setValue($value) { return ''; }
- public function toHtml() { return ''; }
+ public function __toString() { return ''; }
public function getName() { return ''; }
public function setName($name) { }
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm2/tests/QuickForm2/ContainerTest.php?r1=1.6&r2=1.7&diff_format=u
Index: pear/HTML_QuickForm2/tests/QuickForm2/ContainerTest.php
diff -u pear/HTML_QuickForm2/tests/QuickForm2/ContainerTest.php:1.6
pear/HTML_QuickForm2/tests/QuickForm2/ContainerTest.php:1.7
--- pear/HTML_QuickForm2/tests/QuickForm2/ContainerTest.php:1.6 Thu Oct 12 21:24:29 2006
+++ pear/HTML_QuickForm2/tests/QuickForm2/ContainerTest.php Mon Oct 16 14:32:39 2006
@@ -38,7 +38,7 @@
* @package HTML_QuickForm2
* @author Alexey Borzov <avb@php.net>
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: ContainerTest.php,v 1.6 2006/10/12 21:24:29 avb Exp $
+ * @version CVS: $Id: ContainerTest.php,v 1.7 2006/10/16 14:32:39 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm2
*/
@@ -63,7 +63,7 @@
public function getType() { return 'concrete'; }
public function getValue() { return ''; }
public function setValue($value) { return ''; }
- public function toHtml() { return ''; }
+ public function __toString() { return ''; }
}
/**
@@ -76,7 +76,7 @@
public function getType() { return 'concrete'; }
public function getValue() { return ''; }
public function setValue($value) { return ''; }
- public function toHtml() { return ''; }
+ public function __toString() { return ''; }
}
/**
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm2/tests/QuickForm2/ElementTest.php?r1=1.2&r2=1.3&diff_format=u
Index: pear/HTML_QuickForm2/tests/QuickForm2/ElementTest.php
diff -u pear/HTML_QuickForm2/tests/QuickForm2/ElementTest.php:1.2
pear/HTML_QuickForm2/tests/QuickForm2/ElementTest.php:1.3
--- pear/HTML_QuickForm2/tests/QuickForm2/ElementTest.php:1.2 Fri Sep 8 14:02:45 2006
+++ pear/HTML_QuickForm2/tests/QuickForm2/ElementTest.php Mon Oct 16 14:32:39 2006
@@ -38,7 +38,7 @@
* @package HTML_QuickForm2
* @author Alexey Borzov <avb@php.net>
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: ElementTest.php,v 1.2 2006/09/08 14:02:45 avb Exp $
+ * @version CVS: $Id: ElementTest.php,v 1.3 2006/10/16 14:32:39 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm2
*/
@@ -62,7 +62,7 @@
public function getType() { return 'concrete'; }
public function getValue() { return ''; }
public function setValue($value) { return ''; }
- public function toHtml() { return ''; }
+ public function __toString() { return ''; }
}
/**
http://cvs.php.net/viewvc.cgi/pear/HTML_QuickForm2/tests/QuickForm2/Element/InputTest.php?r1=1.1&r2=1.2&diff_format=u
Index: pear/HTML_QuickForm2/tests/QuickForm2/Element/InputTest.php
diff -u pear/HTML_QuickForm2/tests/QuickForm2/Element/InputTest.php:1.1
pear/HTML_QuickForm2/tests/QuickForm2/Element/InputTest.php:1.2
--- pear/HTML_QuickForm2/tests/QuickForm2/Element/InputTest.php:1.1 Mon Sep 4 18:40:30 2006
+++ pear/HTML_QuickForm2/tests/QuickForm2/Element/InputTest.php Mon Oct 16 14:32:39 2006
@@ -38,7 +38,7 @@
* @package HTML_QuickForm2
* @author Alexey Borzov <avb@php.net>
* @license http://opensource.org/licenses/bsd-license.php
New BSD License
- * @version CVS: $Id: InputTest.php,v 1.1 2006/09/04 18:40:30 avb Exp $
+ * @version CVS: $Id: InputTest.php,v 1.2 2006/10/16 14:32:39 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm2
*/
@@ -101,7 +101,7 @@
public function testHtmlGeneration()
{
$obj = new HTML_QuickForm2_Element_InputImpl();
-
$this->assertRegExp('!<input[^>]*type="concrete"[^>]*/>!',
$obj->toHtml());
+
$this->assertRegExp('!<input[^>]*type="concrete"[^>]*/>!',
$obj->__toString());
}
public function testFrozenHtmlGeneration()
@@ -111,11 +111,11 @@
$obj->toggleFrozen(true);
$obj->persistentFreeze(false);
- $this->assertNotRegExp('/[<>]/', $obj->toHtml());
- $this->assertRegExp('/bar/', $obj->toHtml());
+ $this->assertNotRegExp('/[<>]/', $obj->__toString());
+ $this->assertRegExp('/bar/', $obj->__toString());
$obj->persistentFreeze(true);
- $this->assertRegExp('!<input[^>]*type="hidden"[^>]*/>!',
$obj->toHtml());
+ $this->assertRegExp('!<input[^>]*type="hidden"[^>]*/>!',
$obj->__toString());
}
}
?>
\ No newline at end of file