Location: PHPKode > projects > GnomePHP > peec-GnomePHP-b5a360b/gnomephp/form/FormField.php
<?php
namespace gnomephp\form;

abstract class FormField{
	
	
	protected $id;
	
	protected $name;
	
	protected $value;
	
	protected $props=array();
	
	/**
	 * 
	 * @var gnomephp\Url
	 */
	protected $url;
	
	public function __construct($formId, $url, $name, $value = null, $props=array()){
		$this->id = $formId . '_' . $name;	
		$this->name = $name;
		$this->value = $value;
		$this->url = $url;
		$this->props = $props;
	}
	
	
	protected function buildProps($props){
		$str = '';
		foreach($props as $key => $val){
			$str .= ' ' . $key . '=' . '"'.$val.'"';
		}
		return $str;
	}
	
	
	public function getId(){
		return $this->id;
	}
	
	public function getName(){
		return $this->name;
	}
	
	public function getValue(){
		return $this->value;
	}
	
}
Return current item: GnomePHP