PHP best practice: getRecords() accepting one concrete id or getRecordById()?
===

Since I was a part of discussion whether or what is the best practice I would like to also ask You, of course:

Consider having DAO class manipulating with object(s).
What is the best approach:

1. To have one getRecords() method accepting many parameters (for paging, sorting and filtering) including the ID parameter in which presence the method returns
    1. an array containing one concrete object
    2. a concrete object immediately?
2. To have one getRecords() method accepting many parameters (for paging, sorting and filtering) and another getRecordById() method accepting only one ID parameter that returns concrete object?

My opinion is the second choice should be the best practice/approach.


What do You think?