/** * Covert Test to HTML string */ public function getString() { $input = new Generator(); $name = $this->getNameAttributeString(); $value = $this->getValue(); $value = $this->sanitize($value, 'raw'); $max = $this->getMaxlength($value, $this->getAttribute('maxlength')); return $input->newInput($this->getType(), $name, Sanitize::attribute($value), $this->getAttributes())->getString() . $max; }
private function cleanFileName($name) { $name = Sanitize::underscore($name); $name = str_replace('-', ' ', $name); return ucwords($name); }
/** * Set name of field. Not the same as the html name attribute. * * @param string $name * * @return $this */ public function setName($name) { $this->name = Sanitize::underscore($name); return $this; }