for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* This file is part of the Aura project for PHP.
* @package Aura.Input
* @license http://opensource.org/licenses/MIT-license.php MIT
*/
namespace Aura\Input;
* An abstract input class; serves as the base for Fields, Fieldsets, and
* Collections.
abstract class AbstractInput
{
* The name for the input.
* @var string
protected $name;
* The prefix for the name, typically composed of the parent input names.
protected $name_prefix;
* Sets the name for the input.
* @param string $name The input name.
* @return self
public function setName($name)
$this->name = $name;
return $this;
}
* Sets the name prefix for the input, typically composed of the parent
* input names.
* @param string $name_prefix The name prefix.
public function setNamePrefix($name_prefix)
$this->name_prefix = $name_prefix;
* Returns the full name for this input, incuding the prefix (if any).
* @return string
public function getFullName()
$name = $this->name;
if ($this->name_prefix) {
$name = $this->name_prefix . "[{$name}]";
return $name;
* Support for this input when addressed via Fieldset::__get().
public function read()
* Returns this input for the presentation layer.
public function get()
* Returns the value of this input for use in arrays.
* @return mixed
abstract public function getValue();