public function bind($data)
	{
		// Make sure there is a valid Form XML document.
		if (!($this->xml instanceof SimpleXMLElement))
		{
			return false;
		}

		// The data must be an object or array.
		if (!is_object($data) && !is_array($data))
		{
			return false;
		}

		// Convert the input to an array.
		if (is_object($data))
		{
			if ($data instanceof Registry)
			{
				// Handle a Registry.
				$data = $data->toArray();
			}
			elseif ($data instanceof Obj)
			{
				// Handle a Object.
				$data = $data->getProperties();
			}
			else
			{
				// Handle other types of objects.
				$data = (array) $data;
			}
		}

		// Process the input data.
		foreach ($data as $k => $v)
		{
			if ($this->findField($k))
			{
				// If the field exists set the value.
				$this->data->set($k, $v);
			}
			elseif (is_object($v) || Arr::isAssociative($v))
			{
				// If the value is an object or an associative array hand it off to the recursive bind level method.
				$this->bindLevel($k, $v);
			}
		}

		return true;
	}
public function bind($data)
	{
		// Make sure there is a valid Form XML document.
		if (!($this->xml instanceof SimpleXMLElement))
		{
			return false;
		}

		// The data must be an object or array.
		if (!is_object($data) && !is_array($data))
		{
			return false;
		}

		// Convert the input to an array.
		if (is_object($data))
		{
			if ($data instanceof Registry)
			{
				// Handle a Registry.
				$data = $data->toArray();
			}
			elseif ($data instanceof Obj)
			{
				// Handle a Object.
				$data = $data->getProperties();
			}
			else
			{
				// Handle other types of objects.
				$data = (array) $data;
			}
		}

		// Process the input data.
		foreach ($data as $k => $v)
		{
			if ($this->findField($k))
			{
				// If the field exists set the value.
				$this->data->set($k, $v);
			}
			elseif (is_object($v) || Arr::isAssociative($v))
			{
				// If the value is an object or an associative array hand it off to the recursive bind level method.
				$this->bindLevel($k, $v);
			}
		}

		return true;
	}
public function bind ( $ data ) { // Make sure there is a valid Form XML document. if ( ! ( $ this -> xml instanceof SimpleXMLElement ) ) { return false ; } // The data must be an object or array. if ( ! is_object ( $ data ) && ! is_array ( $ data ) ) { return false ; } // Convert the input to an array. if ( is_object ( $ data ) ) { if ( $ data instanceof Registry ) { // Handle a Registry. $ data = $ data -> toArray ( ) ; } elseif ( $ data instanceof Obj ) { // Handle a Object. $ data = $ data -> getProperties ( ) ; } else { // Handle other types of objects. $ data = ( array ) $ data ; } } // Process the input data. foreach ( $ data as $ k => $ v ) { if ( $ this -> findField ( $ k ) ) { // If the field exists set the value. $ this -> data -> set ( $ k , $ v ) ; } elseif ( is_object ( $ v ) || Arr :: isAssociative ( $ v ) ) { // If the value is an object or an associative array hand it off to the recursive bind level method. $ this -> bindLevel ( $ k , $ v ) ; } } return true ; }
Method to bind data to the form.

@param   mixed    $data  An array or object of data to bind to the form.
@return  boolean  True on success.
Method to bind data to the form .