私はここでPhilSturgeonによって書かれた次のコードを使用しています:https ://github.com/philsturgeon/codeigniter-restserver
彼のドキュメントのどこで、コントローラーの側で制限オプションがどのように設定されているかを確認できません。
RESTControllerコントローラーファイルにはいくつかの参照があります。
保護された機能を示します。さらに、次のものがあります。
// How many times can you get to this method an hour?
$limit = $this->methods[$controller_method]['limit'];
そしてrest.php設定から:
/ * | ----------------------------------------------- --------------------------- | RESTの有効化の制限|---------------------------------------------- ---------------------------- | | trueに設定すると、REST_Controllerは各メソッドの使用回数をカウントします| 1時間ごとにAPIキーによって。これは、|でオーバーライドできる一般的なルールです。各コントローラーの$this->メソッド配列。|
誰かがこれを手伝ってくれますか?現在私の髪を抜いています:-)
現在の私のコントローラーメソッドの1つ:
function listservices_get()
{
$organisation_id = $this->get('id');
$organisations = $this->api_buyus_model->list_services($organisation_id);
if($organisations)
{
$this->response($organisations, 200);
}
else
{
$this->response(array('error' => '1', 'errorDesc' => 'Buy us services list could not be retrieved.'), 400);
}
}