# bit-form/2.6.1/includes/API/Route/Routes.php

Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator &amp; Custom Form Builder, version 2.6.1. 64 lines.

- Page: https://pluginprobe.com/plugins/bit-form/2.6.1/code/includes/API/Route/Routes.php
- Raw: https://pluginprobe.com/plugins/bit-form/2.6.1/raw/includes/API/Route/Routes.php
- Modified: 2023-07-16T07:55:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/bit-form/2.6.1/code/includes/API/Route/Routes.php#L10-L20`.

```php
<?php

namespace BitCode\BitForm\API\Route;

use BitCode\BitForm\API\Controller\EntryController;
use WP_REST_Controller;
use WP_REST_Server;

class Routes extends WP_REST_Controller 
{
  private $entryController;

  public function __construct()
  {
    $this->namespace = 'bitform';
    $this->rest_base = 'v1';
    $this->entryController = new EntryController();
  }

  public function register_routes()
  {
    /* google sheet route */
    register_rest_route(
      $this->namespace,
      $this->rest_base . '/google/',
      [
        [
          'methods'             => WP_REST_Server::READABLE,
          'callback'            => [$this->entryController, 'googleAuth'],
          'permission_callback' => '__return_true'
        ]

      ]
    );
    // oneDrive rest route
    register_rest_route(
      $this->namespace,
      $this->rest_base . '/oneDrive/',
      [
        [
          'methods'             => WP_REST_Server::READABLE,
          'callback'            => [$this->entryController, 'oneDriveAuth'],
          'permission_callback' => '__return_true'
        ]

      ]
    );

    // zoho
    register_rest_route(
      $this->namespace,
      $this->rest_base . '/zoho/',
      [
        [
          'methods'             => WP_REST_Server::READABLE,
          'callback'            => [$this->entryController, 'authRedirect'],
          'permission_callback' => '__return_true'
        ]

      ]
    );
  }
}

```
