original_string: public function reload($field = null) {
  		$IDFIELD = static::getIDField();
  		$options = array('where' => $IDFIELD . '=' . $this->$IDFIELD, 'output' => SQLAdapter::ARR_FIRST);
  		if( $field ) {
  			if( !in_array($field, static::$fields) ) {
  				throw new FieldNotFoundException($field, static::getClass());
  			}
  			$i = array_search($this->modFields, $field);
  			if( $i !== false ) {
  				unset($this->modFields[$i]);
  			}
  			$options['what'] = $field;
  		} else {
  			$this->modFields = array();
  		}
  		try {
  			$data = static::get($options);
  		} catch( SQLException $e ) {
  			$data = null;
  		}
  		if( empty($data) ) {
  			$this->markAsDeleted();
  			return false;
  		}
  		if( !is_null($field) ) {
  			$this->data[$field] = $data[$field];
  		} else {
  			$this->data = $data;
  		}
  		return true;
  	}
code: public function reload($field = null) {
  		$IDFIELD = static::getIDField();
  		$options = array('where' => $IDFIELD . '=' . $this->$IDFIELD, 'output' => SQLAdapter::ARR_FIRST);
  		if( $field ) {
  			if( !in_array($field, static::$fields) ) {
  				throw new FieldNotFoundException($field, static::getClass());
  			}
  			$i = array_search($this->modFields, $field);
  			if( $i !== false ) {
  				unset($this->modFields[$i]);
  			}
  			$options['what'] = $field;
  		} else {
  			$this->modFields = array();
  		}
  		try {
  			$data = static::get($options);
  		} catch( SQLException $e ) {
  			$data = null;
  		}
  		if( empty($data) ) {
  			$this->markAsDeleted();
  			return false;
  		}
  		if( !is_null($field) ) {
  			$this->data[$field] = $data[$field];
  		} else {
  			$this->data = $data;
  		}
  		return true;
  	}
code_tokens: public function reload ( $ field = null ) { $ IDFIELD = static :: getIDField ( ) ; $ options = array ( 'where' => $ IDFIELD . '=' . $ this -> $ IDFIELD , 'output' => SQLAdapter :: ARR_FIRST ) ; if ( $ field ) { if ( ! in_array ( $ field , static :: $ fields ) ) { throw new FieldNotFoundException ( $ field , static :: getClass ( ) ) ; } $ i = array_search ( $ this -> modFields , $ field ) ; if ( $ i !== false ) { unset ( $ this -> modFields [ $ i ] ) ; } $ options [ 'what' ] = $ field ; } else { $ this -> modFields = array ( ) ; } try { $ data = static :: get ( $ options ) ; } catch ( SQLException $ e ) { $ data = null ; } if ( empty ( $ data ) ) { $ this -> markAsDeleted ( ) ; return false ; } if ( ! is_null ( $ field ) ) { $ this -> data [ $ field ] = $ data [ $ field ] ; } else { $ this -> data = $ data ; } return true ; }
docstring: Reload fields from database
  
  @param string $field The field to reload, default is null (all fields).
  @return boolean True if done
  @throws FieldNotFoundException
  
  Update the current object's fields from database.
  If $field is not set, it reloads only one field else all fields.
  Also it removes the reloaded fields from the modified ones list.
docstring_tokens: Reload fields from database