X-Git-Url: https://git-public.kairo.at/?p=php-utility-classes.git;a=blobdiff_plain;f=classes%2Fdocument.php-class;fp=classes%2Fdocument.php-class;h=211ae44116cd35bd7ca3e74328591b94cad33576;hp=4490589210b157a29f6442c8ff8a1ce0c386d281;hb=6f794328255b570b1d99017ebd429c525c68fd4e;hpb=c79be4c2c1230110175194a8aee78a5eb20d6af0
diff --git a/classes/document.php-class b/classes/document.php-class
index 4490589..211ae44 100755
--- a/classes/document.php-class
+++ b/classes/document.php-class
@@ -65,6 +65,10 @@ class ExtendedDocument extends DOMDocument {
// appends an ExtendedDocument::createElementInputRange() as a child of this document (see there for params)
// returns the new child
//
+ // public function appendInputSearch($name, $maxlength, $size, [$id], [$value])
+ // appends an ExtendedDocument::createElementInputSearch() as a child of this document (see there for params)
+ // returns the new child
+ //
// public function appendInputUrl($name, $maxlength, $size, [$id], [$value])
// appends an ExtendedDocument::createElementInputUrl() as a child of this document (see there for params)
// returns the new child
@@ -202,6 +206,10 @@ class ExtendedDocument extends DOMDocument {
// returns an ExtendedElement that is an HTML of type 'url' with the given name, maxlength, size,
// and optionally id and value
//
+ // public function createElementInputSearch($name, $maxlength, $size, [$id], [$value])
+ // returns an ExtendedElement that is an HTML of type 'search' with the given name, maxlength, size,
+ // and optionally id and value
+ //
// public function createElementInputEmail($name, $maxlength, $size, [$id], [$value])
// returns an ExtendedElement that is an HTML of type 'email' with the given name, maxlength, size,
// and optionally id and value
@@ -350,6 +358,9 @@ class ExtendedDocument extends DOMDocument {
public function appendInputRange($name, $id, $min, $max, $step = null, $value = null) {
return $this->appendChild($this->createElementInputRange($name, $id, $min, $max, $step, $value));
}
+ public function appendInputSearch($name, $maxlength, $size, $id = null, $value = null) {
+ return $this->appendChild($this->createElementInputSearch($name, $maxlength, $size, $id, $value));
+ }
public function appendInputUrl($name, $maxlength, $size, $id = null, $value = null) {
return $this->appendChild($this->createElementInputUrl($name, $maxlength, $size, $id, $value));
}
@@ -529,6 +540,17 @@ class ExtendedDocument extends DOMDocument {
return $rgfield;
}
+ public function createElementInputSearch($name, $maxlength, $size, $id = null, $value = null) {
+ $urlfield = $this->createElement('input');
+ $urlfield->setAttribute('type', 'search');
+ if (!is_null($id)) { $urlfield->setAttribute('id', $id); }
+ $urlfield->setAttribute('name', $name);
+ $urlfield->setAttribute('maxlength', $maxlength);
+ $urlfield->setAttribute('size', $size);
+ if (!is_null($value)) { $urlfield->setAttribute('value', $value); }
+ return $urlfield;
+ }
+
public function createElementInputUrl($name, $maxlength, $size, $id = null, $value = null) {
$urlfield = $this->createElement('input');
$urlfield->setAttribute('type', 'url');
@@ -760,6 +782,10 @@ class ExtendedElement extends DOMElement {
// appends an ExtendedDocument::createElementInputRange() as a child of this element (see there for params)
// returns the new child
//
+ // public function appendInputSearch($name, $maxlength, $size, [$id], [$value])
+ // appends an ExtendedDocument::createElementInputSearch() as a child of this element (see there for params)
+ // returns the new child
+ //
// public function appendInputUrl($name, $maxlength, $size, [$id], [$value])
// appends an ExtendedDocument::createElementInputUrl() as a child of this element (see there for params)
// returns the new child
@@ -910,6 +936,9 @@ class ExtendedElement extends DOMElement {
public function appendInputRange($name, $id, $min, $max, $step = null, $value = null) {
return $this->appendChild($this->ownerDocument->createElementInputRange($name, $id, $min, $max, $step, $value));
}
+ public function appendInputSearch($name, $maxlength, $size, $id = null, $value = null) {
+ return $this->appendChild($this->ownerDocument->createElementInputSearch($name, $maxlength, $size, $id, $value));
+ }
public function appendInputUrl($name, $maxlength, $size, $id = null, $value = null) {
return $this->appendChild($this->ownerDocument->createElementInputUrl($name, $maxlength, $size, $id, $value));
}
@@ -1052,6 +1081,10 @@ class ExtendedDocumentFragment extends DOMDocumentFragment {
// appends an ExtendedDocument::createElementInputRange() as a child of this fragment (see there for params)
// returns the new child
//
+ // public function appendInputSearch($name, $maxlength, $size, [$id], [$value])
+ // appends an ExtendedDocument::createElementInputSearch() as a child of this fragment (see there for params)
+ // returns the new child
+ //
// public function appendInputUrl($name, $maxlength, $size, [$id], [$value])
// appends an ExtendedDocument::createElementInputUrl() as a child of this fragment (see there for params)
// returns the new child
@@ -1192,6 +1225,9 @@ class ExtendedDocumentFragment extends DOMDocumentFragment {
public function appendInputRange($name, $id, $min, $max, $step = null, $value = null) {
return $this->appendChild($this->ownerDocument->createElementInputRange($name, $id, $min, $max, $step, $value));
}
+ public function appendInputSearch($name, $maxlength, $size, $id = null, $value = null) {
+ return $this->appendChild($this->ownerDocument->createElementInputSearch($name, $maxlength, $size, $id, $value));
+ }
public function appendInputUrl($name, $maxlength, $size, $id = null, $value = null) {
return $this->appendChild($this->ownerDocument->createElementInputUrl($name, $maxlength, $size, $id, $value));
}