From 64744a10c5578602141ae2977274eec3fcff1f44 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Fri, 8 May 2015 20:37:06 +0200 Subject: more elements and work on the legacy support --- inc/Form/ValueElement.php | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 inc/Form/ValueElement.php (limited to 'inc/Form/ValueElement.php') diff --git a/inc/Form/ValueElement.php b/inc/Form/ValueElement.php new file mode 100644 index 000000000..753704c70 --- /dev/null +++ b/inc/Form/ValueElement.php @@ -0,0 +1,45 @@ +val($value); + } + + /** + * Get or set the element's value + * + * @param null|string $value + * @return string|$this + */ + public function val($value = null) { + if($value !== null) { + $this->value = $value; + return $this; + } + return $this->value; + } + +} -- cgit v1.2.3 From 3c8e094acdcf6d556f022bc224b81ef17e449281 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Sun, 2 Aug 2015 00:46:52 +0200 Subject: improve PHPDocs --- inc/Form/ValueElement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'inc/Form/ValueElement.php') diff --git a/inc/Form/ValueElement.php b/inc/Form/ValueElement.php index 753704c70..9dc2fd0df 100644 --- a/inc/Form/ValueElement.php +++ b/inc/Form/ValueElement.php @@ -20,7 +20,7 @@ abstract class ValueElement extends Element { /** * @param string $type - * @param array $value + * @param array|string $value * @param array $attributes */ public function __construct($type, $value, $attributes = array()) { -- cgit v1.2.3