Skip to content

Commit

Permalink
Expand doc blocks for CakeRequest::addDetector.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Aug 27, 2013
1 parent e780919 commit ad75637
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/Cake/Network/CakeRequest.php
Expand Up @@ -581,7 +581,13 @@ public function isAll(array $types) {
*
* Allows for custom detectors on the request parameters.
*
* e.g `addDetector('post', array('param' => 'requested', 'value' => 1)`
* e.g `addDetector('requested', array('param' => 'requested', 'value' => 1)`
*
* You can also make parameter detectors that accept multiple values
* using the `options` key. This is useful when you want to check
* if a request parameter is in a list of options.
*
* `addDetector('extension', array('param' => 'ext', 'options' => array('pdf', 'csv'))`
*
* @param string $name The name of the detector.
* @param array $options The options for the detector definition. See above.
Expand Down

2 comments on commit ad75637

@clns
Copy link
Contributor

@clns clns commented on ad75637 Aug 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, I forgot to update this one. Next time I'll keep in mind.

@markstory
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries. I often forget the docblocks too.

Please sign in to comment.