-
Notifications
You must be signed in to change notification settings - Fork 27
/
Crosswalk.php
64 lines (55 loc) · 1.25 KB
/
Crosswalk.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
namespace Factual;
/**
* Represents a single Crosswalk record from Factual.
* 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 Crosswalk {
private $factual_id; //string
private $url; //string
private $_namespace; //string
private $namespaceId; //string
/**
* Constructor takes array of atributes for single crosswalk result
*/
public function __construct($attrs) {
$this->factualId = $attrs['factual_id'];
$this->url = $attrs['url'];
$this->_namespace = $attrs['namespace'];
$this->namespaceId = $attrs['namespace_id'];
}
/**
* @return string
*/
public function getFactualId() {
return $this->factualId;
}
/**
* @return string
*/
public function getUrl() {
return $this->url;
}
/**
* @return string
*/
public function getNamespace() {
return $this->_namespace;
}
/**
* @return string
*/
public function getNamespaceId() {
return $this->namespaceId;
}
/**
* @return string
*/
public function toString() {
return "[Crosswalk: " . "factualId=" . $this->factual_id . ", url=" . $this->url . ", namespace=" . $this->_namespace . ", namespaceId=" . $this->namespaceId . "]";
}
}
?>