public function bindRequestParameters(ParameterBag $bag = null) {

		if($bag) {
			$this->requestValues = $bag;
		}

		else {
			if($this->request->getMethod() == 'GET') {
				$this->requestValues = $this->request->query;
			}
			else {
				$this->requestValues = $this->request->request;
			}
		}

		// set form element values

		foreach($this->elements as $name => $element) {
			if(is_array($element)) {
				$this->setElementArrayRequestValue($name);
			}
			else {
				$this->setElementRequestValue($element);
			}
		}

		return $this;
	}
public function bindRequestParameters(ParameterBag $bag = null) {

		if($bag) {
			$this->requestValues = $bag;
		}

		else {
			if($this->request->getMethod() == 'GET') {
				$this->requestValues = $this->request->query;
			}
			else {
				$this->requestValues = $this->request->request;
			}
		}

		// set form element values

		foreach($this->elements as $name => $element) {
			if(is_array($element)) {
				$this->setElementArrayRequestValue($name);
			}
			else {
				$this->setElementRequestValue($element);
			}
		}

		return $this;
	}
public function bindRequestParameters ( ParameterBag $ bag = null ) { if ( $ bag ) { $ this -> requestValues = $ bag ; } else { if ( $ this -> request -> getMethod ( ) == 'GET' ) { $ this -> requestValues = $ this -> request -> query ; } else { $ this -> requestValues = $ this -> request -> request ; } } // set form element values foreach ( $ this -> elements as $ name => $ element ) { if ( is_array ( $ element ) ) { $ this -> setElementArrayRequestValue ( $ name ) ; } else { $ this -> setElementRequestValue ( $ element ) ; } } return $ this ; }
initialize parameter bag
parameterbag is either supplied, or depending on request method retrieved from request object

@param ParameterBag $bag
@return HtmlForm
initialize parameter bag parameterbag is either supplied or depending on request method retrieved from request object