original_string: public static function getMethodIfApiRequest($request)
      {
          $module = Common::getRequestVar('module', '', 'string', $request);
          $method = Common::getRequestVar('method', '', 'string', $request);
  
          $isApi = $module === 'API' && !empty($method) && (count(explode('.', $method)) === 2);
          return $isApi ? $method : null;
      }
code: public static function getMethodIfApiRequest($request)
      {
          $module = Common::getRequestVar('module', '', 'string', $request);
          $method = Common::getRequestVar('method', '', 'string', $request);
  
          $isApi = $module === 'API' && !empty($method) && (count(explode('.', $method)) === 2);
          return $isApi ? $method : null;
      }
code_tokens: public static function getMethodIfApiRequest ( $ request ) { $ module = Common :: getRequestVar ( 'module' , '' , 'string' , $ request ) ; $ method = Common :: getRequestVar ( 'method' , '' , 'string' , $ request ) ; $ isApi = $ module === 'API' && ! empty ( $ method ) && ( count ( explode ( '.' , $ method ) ) === 2 ) ; return $ isApi ? $ method : null ; }
docstring: Returns the current API method being executed, if the current request is an API request.
  
  @param array $request  eg array('module' => 'API', 'method' => 'Test.getMethod')
  @return string|null
  @throws Exception
docstring_tokens: Returns the current API method being executed if the current request is an API request .