if( $this->mFeatureID ) {
|
$this->mRow = {... select data from db where feature_id=$this->mFeatureID ...}
|
}
|
- return( count( $this->mErrors ) == 0 );
|
+ return count( $this->mErrors ) == 0; |
}
|
|
// This verifies data integrity. NOTE: pass by reference is crucial, because
|
// some modifications might be necessary (length truncation, etc.);
|
function verify( &$inParams ) {
|
// clean up variables
|
- foreach( array_keys($inParams) as $key ) {
|
- $inParams[[$key] = trim( $inParams[[$key] );
|
+ foreach( $inParams as $key => $value ) { |
+ $inParams[$key] = trim( $value ); |
}
|
|
- if( empty( $inParams[['required_column'] ) ) {
|
- $this->mErrors[['required_column'] = SOME_ERROR_MESSAGE;
|
- } elseif( strlen( $inParams[['required_column'] ) > FEATURE_LENGTH ) {
|
- $inParams[['required_column'] = substring( $inParams[['required_column'],
|
+ if( empty( $inParams['required_column'] ) ) { |
+ $this->mErrors['required_column'] = SOME_ERROR_MESSAGE; |
+ } elseif( strlen( $inParams['required_column'] ) > FEATURE_LENGTH ) { |
+ $inParams['required_column'] = substring( $inParams['required_column'], |
0, FEATURE_LENGTH );
|
}
|
|
{... continue testing hash values various conditions ...}
|
|
- return( count( $this->mErrors ) == 0 );
|
+ return count( $this->mErrors ) == 0; |
}
|
|
// this method stores the data.
|