Skip to content

Commit

Permalink
Adding access specifiers to methods
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Aug 28, 2010
1 parent f7addab commit 04d3353
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions cake/libs/controller/components/request_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,9 @@ public function getClientIP($safe = true) {
* types the client accepts. If a string is passed, returns true
* if the client accepts it. If an array is passed, returns true
* if the client accepts one or more elements in the array.
* @access public
* @see RequestHandlerComponent::setContent()
*/
function accepts($type = null) {
public function accepts($type = null) {
$accepted = $this->request->accepts();

if ($type == null) {
Expand Down Expand Up @@ -455,10 +454,9 @@ public function requestedWith($type = null) {
* 'html', 'xml', 'js', etc.
* @return mixed If $type is null or not provided, the first content-type in the
* list, based on preference, is returned.
* @access public
* @see RequestHandlerComponent::setContent()
*/
function prefers($type = null) {
public function prefers($type = null) {
$accepts = $this->accepts();

if ($type == null) {
Expand Down Expand Up @@ -493,11 +491,10 @@ function prefers($type = null) {
* @param object $controller A reference to a controller object
* @param string $type Type of response to send (e.g: 'ajax')
* @return void
* @access public
* @see RequestHandlerComponent::setContent()
* @see RequestHandlerComponent::respondAs()
*/
function renderAs(&$controller, $type) {
public function renderAs(&$controller, $type) {
$options = array('charset' => 'UTF-8');

if (Configure::read('App.encoding') !== null) {
Expand Down Expand Up @@ -547,10 +544,9 @@ function renderAs(&$controller, $type) {
* @return boolean Returns false if the friendly type name given in $type does
* not exist in the type map, or if the Content-type header has
* already been set by this method.
* @access public
* @see RequestHandlerComponent::setContent()
*/
function respondAs($type, $options = array()) {
public function respondAs($type, $options = array()) {
$defaults = array('index' => null, 'charset' => null, 'attachment' => false);
$options = $options + $defaults;

Expand Down Expand Up @@ -628,5 +624,4 @@ public function mapAlias($alias) {
}
return null;
}

}

0 comments on commit 04d3353

Please sign in to comment.