</span><spanid="3" class="l"><ahref="#3"> 3: </a><spanclass="php-keyword2">defined</span>(<spanclass="php-quote">'BASEPATH'</span>) <spanclass="php-keyword1">OR</span><spanclass="php-keyword1">exit</span>(<spanclass="php-quote">'No direct script access allowed'</span>);
</span><spanid="4" class="l"><ahref="#4"> 4: </a>
</span><spanid="5" class="l"><ahref="#5"> 5: </a><spanclass="php-comment">// This can be removed if you use __autoload() in config.php OR use Modular Extensions</span>
</span></span><spanid="10" class="l"><ahref="#10"> 10: </a><spanclass="php-comment"> * This is a basic Key Management REST controller to make and delete keys
</span><spanid="49" class="l"><ahref="#49"> 49: </a> ], REST_Controller::HTTP_CREATED); <spanclass="php-comment">// CREATED (201) being the HTTP response code</span>
</span><spanid="55" class="l"><ahref="#55"> 55: </a><spanclass="php-quote">'message'</span> => <spanclass="php-quote">'Could not save the key'</span>
</span><spanid="56" class="l"><ahref="#56"> 56: </a> ], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); <spanclass="php-comment">// INTERNAL_SERVER_ERROR (500) being the HTTP response code</span>
</span><spanid="116" class="l"><ahref="#116">116: </a><spanclass="php-quote">'message'</span> => <spanclass="php-quote">'API key was updated'</span>
</span><spanid="117" class="l"><ahref="#117">117: </a> ], REST_Controller::HTTP_OK); <spanclass="php-comment">// OK (200) being the HTTP response code</span>
</span><spanid="123" class="l"><ahref="#123">123: </a><spanclass="php-quote">'message'</span> => <spanclass="php-quote">'Could not update the key level'</span>
</span><spanid="124" class="l"><ahref="#124">124: </a> ], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); <spanclass="php-comment">// INTERNAL_SERVER_ERROR (500) being the HTTP response code</span>
</span><spanid="153" class="l"><ahref="#153">153: </a><spanclass="php-quote">'message'</span> => <spanclass="php-quote">'Key was suspended'</span>
</span><spanid="154" class="l"><ahref="#154">154: </a> ], REST_Controller::HTTP_OK); <spanclass="php-comment">// OK (200) being the HTTP response code</span>
</span><spanid="160" class="l"><ahref="#160">160: </a><spanclass="php-quote">'message'</span> => <spanclass="php-quote">'Could not suspend the user'</span>
</span><spanid="161" class="l"><ahref="#161">161: </a> ], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); <spanclass="php-comment">// INTERNAL_SERVER_ERROR (500) being the HTTP response code</span>
</span><spanid="198" class="l"><ahref="#198">198: </a> ], REST_Controller::HTTP_CREATED); <spanclass="php-comment">// CREATED (201) being the HTTP response code</span>
</span><spanid="204" class="l"><ahref="#204">204: </a><spanclass="php-quote">'message'</span> => <spanclass="php-quote">'Could not save the key'</span>
</span><spanid="205" class="l"><ahref="#205">205: </a> ], REST_Controller::HTTP_INTERNAL_SERVER_ERROR); <spanclass="php-comment">// INTERNAL_SERVER_ERROR (500) being the HTTP response code</span>