Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Expand doc blocks for CakeRequest::addDetector.

  • Loading branch information...
commit ad7563736f5735b0a373b9c127b86871441554e6 1 parent e780919
@markstory markstory authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/Cake/Network/CakeRequest.php
View
8 lib/Cake/Network/CakeRequest.php
@@ -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.

2 comments on commit ad75637

@clns

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

@markstory
Owner

No worries. I often forget the docblocks too.

Please sign in to comment.
Something went wrong with that request. Please try again.