// 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
// returns an ExtendedElement that is an HTML <input> 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 <input> 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 <input> of type 'email' with the given name, maxlength, size,
// and optionally id and value
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));
}
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');
// 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
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));
}
// 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
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));
}
elseif ($this->uadata['os'] == 'WinNT') { $this->uadata['os'] = 'Windows NT'; }
elseif ($this->uadata['os'] == 'Win32') { $this->uadata['os'] = 'Windows (32bit)'; }
elseif ($this->uadata['os'] == 'Win64') { $this->uadata['os'] = 'Windows (64bit)'; }
- elseif (preg_match('/iPhone OS ([\d_]+)/i', $this->uadata['os'], $regs)) { $this->uadata['os'] = 'iOS '.str_replace('_', '.', $regs[1]); }
- elseif (preg_match('/Mac ?OS ?X/i', $this->uadata['os'])) { $this->uadata['os'] = 'MacOS X'; }
- elseif (preg_match('/Mac_P(ower|)PC/i', $this->uadata['os'])) { $this->uadata['os'] = 'MacOS'; }
+ elseif (preg_match('/iPhone OS ([\d_]+)/i', ($this->uadata['os'] ?? ''), $regs)) { $this->uadata['os'] = 'iOS '.str_replace('_', '.', $regs[1]); }
+ elseif (preg_match('/Mac ?OS ?X/i', ($this->uadata['os'] ?? ''))) { $this->uadata['os'] = 'MacOS X'; }
+ elseif (preg_match('/Mac_P(ower|)PC/i', ($this->uadata['os'] ?? ''))) { $this->uadata['os'] = 'MacOS'; }
elseif (strpos($this->uadata['os'] ?? '', 'darwin') !== false) { $this->uadata['os'] = 'MacOS X'; }
elseif (strpos($this->uadata['os'] ?? '', 'Darwin') !== false) { $this->uadata['os'] = 'MacOS X'; }
elseif (strpos($this->uadata['os'] ?? '', 'apple') !== false) { $this->uadata['os'] = 'MacOS'; }
elseif (strpos($this->uadata['os'] ?? '', 'Macintosh') !== false) { $this->uadata['os'] = 'MacOS'; }
- elseif (preg_match('/(?:web|hpw)OS\/([0-9a-zA-Z\._+]+)/i', $this->uadata['os'], $regs)) { $this->uadata['os'] = 'webOS '.$regs[1]; }
- elseif (preg_match('/Android \(Linux (.+)\)/i', $this->uadata['os'], $regs)) { $this->uadata['os'] = 'Android '.$regs[1]; }
+ elseif (preg_match('/(?:web|hpw)OS\/([0-9a-zA-Z\._+]+)/i', ($this->uadata['os'] ?? ''), $regs)) { $this->uadata['os'] = 'webOS '.$regs[1]; }
+ elseif (preg_match('/Android \(Linux (.+)\)/i', ($this->uadata['os'] ?? ''), $regs)) { $this->uadata['os'] = 'Android '.$regs[1]; }
elseif (strpos($this->uadata['os'] ?? '', 'linux') !== false) { $this->uadata['os'] = 'Linux'; }
elseif (preg_match('/SymbianOS[\/ ]([0-9a-zA-Z\._+]+)/i', $this->uastring, $regs)) { $this->uadata['os'] = 'SymbianOS '.$regs[1]; }
- elseif (preg_match('/Symbian ?OS/i', $this->uadata['os'])) { $this->uadata['os'] = 'SymbianOS'; }
+ elseif (preg_match('/Symbian ?OS/i', ($this->uadata['os'] ?? ''))) { $this->uadata['os'] = 'SymbianOS'; }
if (strpos($this->uadata['os'] ?? '', 'Win') !== false) { $this->uadata['platform'] = 'Windows'; }
elseif (strpos($this->uadata['os'] ?? '', 'Mac') !== false) { $this->uadata['platform'] = 'Macintosh'; }