是否有相应的RESTful PHP函数的标准?

Cit*_*zen 5 php api rest standards coding-style

在一个宁静的水果API中,请求假定如下:

api/fruit
api/fruit?limit=100
api/fruit/1
api/fruit?color=red
Run Code Online (Sandbox Code Playgroud)

我认为必须有一个标准的功能来完成这项工作.例如,某些东西可能很容易转化为fruit.class.php.

fruit.class.php

function get ($id, $params, $limit) {
    // query, etc.
}
Run Code Online (Sandbox Code Playgroud)

所以对于我上面的例子,代码看起来像

有这样的行业标准还是API /数据库功能总是一团糟?我真的很想标准化我的功能.