Phorm/Phorm.class.php
/**
	 * Internal method used by the constructor to find all of the fields in the
	 * class after the child's 'define_fields' is called. Returns an array of
	 * the field instances.
	 *
	 * @return array the field instances
	 */
Internal method used by the constructor to find all of the fields in the
class after the child's 'define_fields' is called. Returns an array of
the field instances.

@return array the field instances
Internal method used by the constructor to find all of the fields in the class after the child ' s ' define_fields ' is called . Returns an array of the field instances . @return array the field instances
private function find_fields()
	{
		$found = array();
		foreach( array_keys(get_object_vars($this)) as $name )
		{
			if( $this->$name instanceof Phorm_Field )
			{
				$name = htmlentities($name);
				$id = sprintf('id_%s', $name);
				$this->$name->set_attribute('id', $id);
				$this->$name->set_attribute('name', ($this->$name->multi_field) ? sprintf('%s[]', $name) : $name);
				$found[$name] = & $this->$name;
			}
		}
		return $found;
	}
private function find_fields ( ) { $ found = array ( ) ; foreach ( array_keys ( get_object_vars ( $ this ) ) as $ name ) { if ( $ this -> $ name instanceof Phorm_Field ) { $ name = htmlentities ( $ name ) ; $ id = sprintf ( 'id_%s' , $ name ) ; $ this -> $ name -> set_attribute ( 'id' , $ id ) ; $ this -> $ name -> set_attribute ( 'name' , ( $ this -> $ name -> multi_field ) ? sprintf ( '%s[]' , $ name ) : $ name ) ; $ found [ $ name ] = & $ this -> $ name ; } } return $ found ; }
Internal method used by the constructor to find all of the fields in the
 class after the child's 'define_fields' is called.
Internal method used by the constructor to find all of the fields in the class after the child ' s ' define_fields ' is called .