- foreach($this->selectors as $regex => $funcs) {
- if(preg_match($regex, $path, $matches)) {
- if(isset($funcs[$method])) {
-
- // authenticate regardless of the operation and set the current
- // user. each handler will decide if auth is required or not.
- if(!$this->authenticate()) {
- if ($always_authenticate) {
- $this->auth_required('Credentials required.');
+ foreach ( $this->selectors as $regex => $funcs ) {
+ if ( preg_match($regex, $path, $matches) ) {
+ if ( isset($funcs[$method]) ) {
+
+ // authenticate regardless of the operation and set the current
+ // user. each handler will decide if auth is required or not.
+ if ( !$this->authenticate() ) {
+ if ( $always_authenticate )
+ $this->auth_required('Credentials required.');