original_string: public function is($characteristic)
      {
          switch ( strtolower($characteristic) ) {
              case "ajax":
                  return ( 
                      isset($this->_env['HTTP_X_REQUESTED_WITH']) &&
                      $this->_env['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest"
                  );
              case "delete":
                  return ( $this->method == "DELETE" );
              case "flash":
                  return (
                      $this->_env['HTTP_USER_AGENT'] == "Shockwave Flash"
                  );
              case "get":
                  return ( $this->method == "GET" );
              case "head":
                  return ( $this->method == "HEAD" );
              case "mobile":
                  $mobile_user_agents = array(
                      "Android", "AvantGo", "Blackberry", "DoCoMo", "iPod",
                      "iPhone", "J2ME", "NetFront", "Nokia", "MIDP", "Opera Mini",
                      "PalmOS", "PalmSource", "Plucker", "portalmmm",
                      "ReqwirelessWeb", "SonyEricsson", "Symbian", "UP\.Browser",
                      "Windows CE", "Xiino"
                  );
                  $pattern = "/" . implode("|", $mobile_user_agents) . "/i";
                  return (boolean) preg_match(
                      $pattern, $this->_env['HTTP_USER_AGENT']
                  );
              case "options":
                  return ( $this->method == "OPTIONS" );
              case "post":
                  return ( $this->method == "POST" );
              case "put":
                  return ( $this->method == "PUT" );
              case "ssl":
                  return $this->_env['HTTPS'];
              default:
                  return false;
          }
      }
code: public function is($characteristic)
      {
          switch ( strtolower($characteristic) ) {
              case "ajax":
                  return ( 
                      isset($this->_env['HTTP_X_REQUESTED_WITH']) &&
                      $this->_env['HTTP_X_REQUESTED_WITH'] == "XMLHttpRequest"
                  );
              case "delete":
                  return ( $this->method == "DELETE" );
              case "flash":
                  return (
                      $this->_env['HTTP_USER_AGENT'] == "Shockwave Flash"
                  );
              case "get":
                  return ( $this->method == "GET" );
              case "head":
                  return ( $this->method == "HEAD" );
              case "mobile":
                  $mobile_user_agents = array(
                      "Android", "AvantGo", "Blackberry", "DoCoMo", "iPod",
                      "iPhone", "J2ME", "NetFront", "Nokia", "MIDP", "Opera Mini",
                      "PalmOS", "PalmSource", "Plucker", "portalmmm",
                      "ReqwirelessWeb", "SonyEricsson", "Symbian", "UP\.Browser",
                      "Windows CE", "Xiino"
                  );
                  $pattern = "/" . implode("|", $mobile_user_agents) . "/i";
                  return (boolean) preg_match(
                      $pattern, $this->_env['HTTP_USER_AGENT']
                  );
              case "options":
                  return ( $this->method == "OPTIONS" );
              case "post":
                  return ( $this->method == "POST" );
              case "put":
                  return ( $this->method == "PUT" );
              case "ssl":
                  return $this->_env['HTTPS'];
              default:
                  return false;
          }
      }
code_tokens: public function is ( $ characteristic ) { switch ( strtolower ( $ characteristic ) ) { case "ajax" : return ( isset ( $ this -> _env [ 'HTTP_X_REQUESTED_WITH' ] ) && $ this -> _env [ 'HTTP_X_REQUESTED_WITH' ] == "XMLHttpRequest" ) ; case "delete" : return ( $ this -> method == "DELETE" ) ; case "flash" : return ( $ this -> _env [ 'HTTP_USER_AGENT' ] == "Shockwave Flash" ) ; case "get" : return ( $ this -> method == "GET" ) ; case "head" : return ( $ this -> method == "HEAD" ) ; case "mobile" : $ mobile_user_agents = array ( "Android" , "AvantGo" , "Blackberry" , "DoCoMo" , "iPod" , "iPhone" , "J2ME" , "NetFront" , "Nokia" , "MIDP" , "Opera Mini" , "PalmOS" , "PalmSource" , "Plucker" , "portalmmm" , "ReqwirelessWeb" , "SonyEricsson" , "Symbian" , "UP\.Browser" , "Windows CE" , "Xiino" ) ; $ pattern = "/" . implode ( "|" , $ mobile_user_agents ) . "/i" ; return ( boolean ) preg_match ( $ pattern , $ this -> _env [ 'HTTP_USER_AGENT' ] ) ; case "options" : return ( $ this -> method == "OPTIONS" ) ; case "post" : return ( $ this -> method == "POST" ) ; case "put" : return ( $ this -> method == "PUT" ) ; case "ssl" : return $ this -> _env [ 'HTTPS' ] ; default : return false ; } }
docstring: Checks for request characteristics.
  
  The full list of request characteristics is as follows:
  
  * "ajax" - XHR
  * "delete" - DELETE REQUEST_METHOD
  * "flash" - "Shockwave Flash" HTTP_USER_AGENT
  * "get" - GET REQUEST_METHOD
  * "head" - HEAD REQUEST_METHOD
  * "mobile"  - any one of the following HTTP_USER_AGENTS:
  
  1. "Android"
  1. "AvantGo"
  1. "Blackberry"
  1. "DoCoMo"
  1. "iPod"
  1. "iPhone"
  1. "J2ME"
  1. "NetFront"
  1. "Nokia"
  1. "MIDP"
  1. "Opera Mini"
  1. "PalmOS"
  1. "PalmSource"
  1. "Plucker"
  1. "portalmmm"
  1. "ReqwirelessWeb"
  1. "SonyEricsson"
  1. "Symbian"
  1. "UP.Browser"
  1. "Windows CE"
  1. "Xiino"
  
  * "options" - OPTIONS REQUEST_METHOD
  * "post"    - POST REQUEST_METHOD
  * "put"     - PUT REQUEST_METHOD
  * "ssl"     - HTTPS
  
  @access public
  @param string $characteristic    The characteristic.
  @return bool
docstring_tokens: Checks for request characteristics .