forked from slot/factual-php-driver
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathFactualColumnSchema.php
35 lines (30 loc) · 902 Bytes
/
FactualColumnSchema.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* This is a refactoring of the Factual Driver by Aaron: https://github.com/Factual/factual-java-driver
* @author Tyler
* @package Factual
* @license Apache 2.0
*/
class FactualColumnSchema {
public $name; //string
public $description; //string
public $faceted; //bool
public $sortable; //bool
public $label; //string
public $datatype; //string
public $searchable; //bool
/**
* Constructor. Maps raw column schema data into a new ColumnSchema.
* @param map Array of schema as provided by Factual.
*/
public function __construct($map) {
$this->name = (string) $map['name'];
$this->description = (string) $map['description'];
$this->label = (string) $map['label'];
$this->datatype = (string) $map['datatype'];
$this->faceted = (boolean) $map['faceted'];
$this->sortable = (boolean) $map['sortable'];
$this->searchable = (boolean) $map['searchable'];
}
}
?>