aaemnnosttv / silk

A modern API for WordPress.

Home Page:https://aaemnnost.tv/silk/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Soft Model Retrieval Methods

aaemnnosttv opened this issue · comments

As it is, the current methods for retrieving a model instance are all "hard" methods, in that they all throw a not found exception in the event that there is no record found for the given ID, slug, etc.

There are times however when an exception is not necessary and a simple falsy value would be more efficient. This would allow for more flexibility by not forcing the user to handle exceptions in all cases.