phpDataMapper icon indicating copy to clipboard operation
phpDataMapper copied to clipboard

loadFields($fields) for internal field validation

Open JeromeDane opened this issue 13 years ago • 0 comments

Pull request for this post

Separated out field validation logic within phpDataMapper_Base::field() to protected phpDataMapper_Base::loadFields(array $fields) to give classes that extend from the base more flexibility in defining their fields. It also makes sense to have the "get fields" method ( fields() ) just return fields and let another method handle the loading/validation.

Maybe I should have called this "validateFields" since that's more what it does. Feel free to correct.

JeromeDane avatar Mar 09 '11 15:03 JeromeDane