PluginProbe
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards / 5.5.84
WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards v5.5.84
5.5.84 5.5.83 5.5.82 5.5.81 5.5.80 5.5.79 5.5.77 5.5.76 5.5.75 5.5.73 5.5.72 5.5.22 5.5.23 5.5.29 5.5.3 5.5.31 5.5.32 5.5.34 5.5.35 5.5.36 5.5.37 5.5.4 5.5.40 5.5.41 5.5.42 All 160 releases
wp-data-access / WPDataAccess / Drive / WPDA_Drive.php

WPDA_Drive.php in WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards 5.5.84, at WPDataAccess/Drive/WPDA_Drive.php

46 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace WPDataAccess\Drive {
4
5 abstract class WPDA_Drive {
6
7 protected $drive_type = null; // must be defined in constructor
8
9 protected $drive_name = null;
10 protected $drive = array();
11 protected $enabled = false;
12
13 public function __construct( $drive_name, $drive = array(), $enabled = false ) {
14
15 $this->drive_name = $drive_name;
16 $this->drive = $drive;
17 $this->enabled = $enabled;
18
19 }
20
21 final public function save() {
22
23 if (
24 $this->drive_name !== null &&
25 $this->drive_type !== null
26 ) {
27 WPDA_Drives::set_drive($this->drive_name, $this->drive, $this->drive_type, $this->enabled);
28 WPDA_Drives::save();
29
30 return true;
31 } else {
32 return false;
33 }
34
35 }
36
37 public abstract function authorize( $authorization, $enabled = true );
38 public abstract function refresh_token();
39 public abstract function connect();
40 public abstract function close();
41 public abstract function upload_file( $local_file, $remote_file );
42 public abstract function cleanup( $query, $keep );
43
44 }
45
46 }