Skip to content

Commit

Permalink
Unified comments
Browse files Browse the repository at this point in the history
  • Loading branch information
softwarespot committed Sep 12, 2015
1 parent 23e8142 commit 5e2ae86
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions application/libraries/REST_Controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ abstract class REST_Controller extends CI_Controller {
const HTTP_NETWORK_AUTHENTICATION_REQUIRED = 511;

/**
* This defines the rest format.
* Must be overridden it in a controller so that it is set.
* This defines the rest format
* Must be overridden it in a controller so that it is set
*
* @var string|NULL
*/
Expand Down Expand Up @@ -269,7 +269,7 @@ abstract class REST_Controller extends CI_Controller {
protected $_args = [];

/**
* If the request is allowed based on the API key provided.
* If the request is allowed based on the API key provided
*
* @var bool
*/
Expand Down Expand Up @@ -323,7 +323,7 @@ abstract class REST_Controller extends CI_Controller {
* Enable XSS flag
* Determines whether the XSS filter is always active when
* GET, OPTIONS, HEAD, POST, PUT, DELETE and PATCH data is encountered.
* Set automatically based on config setting.
* Set automatically based on config setting
*
* @var bool
*/
Expand Down Expand Up @@ -560,11 +560,11 @@ public function __destruct()
/**
* Requests are not made to methods directly, the request will be for
* an "object". This simply maps the object and method to the correct
* Controller method.
* Controller method
*
* @access public
* @param string $object_called
* @param array $arguments The arguments passed to the controller method.
* @param array $arguments The arguments passed to the controller method
*/
public function _remap($object_called, $arguments)
{
Expand All @@ -588,7 +588,7 @@ public function _remap($object_called, $arguments)
// Use keys for this method?
$use_key = !(isset($this->methods[$controller_method]['key']) && $this->methods[$controller_method]['key'] === FALSE);

// They provided a key, but it wasn't valid, so get them out of here.
// They provided a key, but it wasn't valid, so get them out of here
if ($this->config->item('rest_enable_keys') && $use_key && $this->_allow === FALSE)
{
if ($this->config->item('rest_enable_logging') && $log_method)
Expand All @@ -602,7 +602,7 @@ public function _remap($object_called, $arguments)
], self::HTTP_FORBIDDEN);
}

// Check to see if this key has access to the requested controller.
// Check to see if this key has access to the requested controller
if ($this->config->item('rest_enable_keys') && $use_key && empty($this->rest->key) === FALSE && $this->_check_access() === FALSE)
{
if ($this->config->item('rest_enable_logging') && $log_method)
Expand Down Expand Up @@ -713,7 +713,7 @@ public function response($data = NULL, $http_code = NULL, $continue = FALSE)
$this->output->set_content_type($this->_supported_formats[$this->response->format], strtolower($this->config->item('charset')));
$output = $this->format->factory($data)->{'to_' . $this->response->format}();

// An array must be parsed as a string, so as not to cause an array to string error.
// An array must be parsed as a string, so as not to cause an array to string error
// Json is the most appropriate form for such a datatype
if ($this->response->format === 'array')
{
Expand Down Expand Up @@ -763,7 +763,7 @@ public function response($data = NULL, $http_code = NULL, $continue = FALSE)
* Takes mixed data and optionally a status code, then creates the response
* within the buffers of the Output class. The response is sent to the client
* lately by the framework, after the current controller's method termination.
* All the hooks after the controller's method termination are executable.
* All the hooks after the controller's method termination are executable
*
* @access public
* @param array|NULL $data Data to output to the user
Expand Down Expand Up @@ -904,7 +904,7 @@ protected function _detect_method()

if (empty($method))
{
// Get the request method as a lowercase string.
// Get the request method as a lowercase string
$method = $this->input->method();
}

Expand Down Expand Up @@ -948,7 +948,7 @@ protected function _detect_api_key()

/*
* If "is private key" is enabled, compare the ip address with the list
* of valid ip addresses stored in the database.
* of valid ip addresses stored in the database
*/
if (empty($row->is_private_key) === FALSE)
{
Expand All @@ -973,7 +973,7 @@ protected function _detect_api_key()
}
else
{
// There should be at least one IP address for this private key.
// There should be at least one IP address for this private key
return FALSE;
}
}
Expand Down Expand Up @@ -1617,7 +1617,7 @@ public function query($key = NULL, $xss_clean = NULL)

/**
* Sanitizes data so that Cross Site Scripting Hacks can be
* prevented.
* prevented
*
* @access protected
* @param string $value Input data
Expand Down

0 comments on commit 5e2ae86

Please sign in to comment.