original_string: public function getActionName()
      {
          if (is_array($this->actionName)) {
              return $this->actionName;
          }
          if (empty($this->pages)) {
              throw new HTML_QuickForm2_NotFoundException('No pages added to the form');
          }
          $names = array_map('preg_quote', array_keys($this->pages));
          $regex = '/^_qf_(' . implode('|', $names) . ')_(.+?)(_x)?$/';
          foreach (array_keys($_REQUEST) as $key) {
              if (preg_match($regex, $key, $matches)) {
                  $this->actionName = array($matches[1], $matches[2]);
                  break;
              }
          }
          if (!is_array($this->actionName)) {
              reset($this->pages);
              $this->actionName = array(key($this->pages), 'display');
          }
          return $this->actionName;
      }
code: public function getActionName()
      {
          if (is_array($this->actionName)) {
              return $this->actionName;
          }
          if (empty($this->pages)) {
              throw new HTML_QuickForm2_NotFoundException('No pages added to the form');
          }
          $names = array_map('preg_quote', array_keys($this->pages));
          $regex = '/^_qf_(' . implode('|', $names) . ')_(.+?)(_x)?$/';
          foreach (array_keys($_REQUEST) as $key) {
              if (preg_match($regex, $key, $matches)) {
                  $this->actionName = array($matches[1], $matches[2]);
                  break;
              }
          }
          if (!is_array($this->actionName)) {
              reset($this->pages);
              $this->actionName = array(key($this->pages), 'display');
          }
          return $this->actionName;
      }
code_tokens: public function getActionName ( ) { if ( is_array ( $ this -> actionName ) ) { return $ this -> actionName ; } if ( empty ( $ this -> pages ) ) { throw new HTML_QuickForm2_NotFoundException ( 'No pages added to the form' ) ; } $ names = array_map ( 'preg_quote' , array_keys ( $ this -> pages ) ) ; $ regex = '/^_qf_(' . implode ( '|' , $ names ) . ')_(.+?)(_x)?$/' ; foreach ( array_keys ( $ _REQUEST ) as $ key ) { if ( preg_match ( $ regex , $ key , $ matches ) ) { $ this -> actionName = array ( $ matches [ 1 ] , $ matches [ 2 ] ) ; break ; } } if ( ! is_array ( $ this -> actionName ) ) { reset ( $ this -> pages ) ; $ this -> actionName = array ( key ( $ this -> pages ) , 'display' ) ; } return $ this -> actionName ; }
docstring: Extracts the name of the page and the action to perform with it from HTTP request data
  
  @return array     first element is page name, second is action name
docstring_tokens: Extracts the name of the page and the action to perform with it from HTTP request data