Completed
Push — development ( a57866...c9d234 )
by
unknown
02:32
created

Network_Datastore   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 29
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A get_meta_type() 0 3 1
A get_table_name() 0 4 1
A get_table_field_name() 0 3 1
1
<?php
2
3
namespace Carbon_Fields\Datastore;
4
5
use Carbon_Fields\Field\Field;
6
7
/**
8
 * Theme options datastore class.
9
 */
10
class Network_Datastore extends Meta_Datastore {
11
	/**
12
	 * Retrieve the type of meta data.
13
	 *
14
	 * @return string
15
	 */
16
	public function get_meta_type() {
17
		return 'site';
18
	}
19
20
	/**
21
	 * Retrieve the meta table name to query.
22
	 *
23
	 * @return string
24
	 */
25
	public function get_table_name() {
26
		global $wpdb;
27
		return $wpdb->sitemeta;
28
	}
29
30
	/**
31
	 * Retrieve the meta table field name to query by.
32
	 *
33
	 * @return string
34
	 */
35
	public function get_table_field_name() {
36
		return 'site_id';
37
	}
38
}
39