Example #1
0
 /**
  * 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;
 }
Example #2
0
 private function cleanFileName($name)
 {
     $name = Sanitize::underscore($name);
     $name = str_replace('-', ' ', $name);
     return ucwords($name);
 }
Example #3
0
 /**
  * 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;
 }