phpDataMapper
phpDataMapper copied to clipboard
loadFields($fields) for internal field validation
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.