public static function getParams(array $methods = null) {
    if(null === $methods) {
      $methods = [self::getMethod()];
    }
    $params = [];
    if($methods) {
      // This will uniquefy the methods.
      $methods = array_flip(array_flip($methods));

      // Run over the methods.
      foreach($methods as $method) {
        switch(strtoupper($method)) {
          case 'GET':
            $params = array_merge($params, $_GET);
            break;
          case 'POST':
            $params = array_merge($params, $_POST);
            break;
        }
      }
    }
    return $params;
  }