author | ymh <ymh.work@gmail.com> |
Tue, 23 Feb 2016 17:57:46 +0100 | |
changeset 128 | bc18286e55b2 |
parent 125 | e550b10fe3ca |
child 130 | fac22d8c2df8 |
permissions | -rw-r--r-- |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
1 |
<?php |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
2 |
namespace CorpusParole\Models; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
4 |
use Config; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
5 |
use CorpusParole\Libraries\Utils; |
18
f2a40bbc27f6
add rdf mapper + merger + basic database model
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
6 |
use CorpusParole\Libraries\CocoonUtils; |
3
2b3247d02769
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
7 |
use CorpusParole\Libraries\RdfModel\RdfModelResource; |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
8 |
use JsonSerializable; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
use Log; |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
10 |
use EasyRdf\Literal; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
11 |
use EasyRdf\Resource; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
12 |
use EasyRdf\Graph; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
13 |
use EasyRdf\Isomorphic; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
14 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
15 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
16 |
/** |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
17 |
* Model class for Document. Inherit from EasyRd\Resource |
3
2b3247d02769
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
18 |
* SELECT DISTINCT ?g WHERE {GRAPH ?g {?s ?p ?o}} |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
19 |
*/ |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
20 |
class Document extends RdfModelResource implements JsonSerializable { |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
21 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
22 |
public function __construct($uri, $graph = null) { |
122 | 23 |
//print($graph->dump('html')); |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
24 |
parent::__construct($uri, $graph); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
25 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
26 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
27 |
private $id = null; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
28 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
29 |
// memoization |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
30 |
private $providedCHO = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
31 |
private $title = false; |
28 | 32 |
private $lang = null; |
125 | 33 |
private $langResolved = null; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
34 |
private $publishers = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
35 |
private $mediaArray = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
36 |
private $issued = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
37 |
private $modified = null; |
28 | 38 |
private $contributors = null; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
39 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
40 |
public function getProvidedCHO() { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
41 |
if(is_null($this->providedCHO)) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
42 |
$this->providedCHO = $this->get("<http://www.europeana.eu/schemas/edm/aggregatedCHO>"); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
43 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
44 |
return $this->providedCHO; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
45 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
46 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
47 |
private function clearMemoizationCache() { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
48 |
$this->providedCHO = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
49 |
$this->title = false; |
28 | 50 |
$this->lang = null; |
125 | 51 |
$this->langResolved = null; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
52 |
$this->publishers = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
53 |
$this->mediaArray = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
54 |
$this->issued = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
55 |
$this->modified = null; |
28 | 56 |
$this->contributors = null; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
57 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
58 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
59 |
public function getId() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
60 |
if(is_null($this->id)) { |
122 | 61 |
$ids = $this->getProvidedCHO()->all('<http://purl.org/dc/elements/1.1/identifier>'); |
62 |
foreach ($ids as $id) { |
|
63 |
if($id instanceof Literal && strpos($id->getValue(), config('corpusparole.corpus_id_scheme')) === 0) { |
|
64 |
$this->id = $id->getValue(); |
|
65 |
} |
|
66 |
} |
|
115 | 67 |
if(is_null($this->id)) { |
68 |
$this->id = CocoonUtils::getIdFromCorpusUri($this->uri); |
|
69 |
} |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
70 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
71 |
return $this->id; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
72 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
73 |
|
28 | 74 |
public function getLanguage() { |
75 |
if(is_null($this->lang)) { |
|
76 |
try { |
|
77 |
$langs = $this->getProvidedCHO()->all('<http://purl.org/dc/elements/1.1/language>'); |
|
78 |
if(count($langs) > 0) { |
|
79 |
$this->lang = $langs[0]; |
|
80 |
} |
|
81 |
} catch(\Exception $e) { |
|
82 |
$this->lang = null; |
|
83 |
} |
|
84 |
} |
|
85 |
return $this->lang; |
|
86 |
} |
|
87 |
||
88 |
public function getLanguageValue() { |
|
89 |
$lang = $this->getLanguage(); |
|
90 |
if($lang instanceof Resource) { |
|
91 |
return $lang->getUri(); |
|
92 |
} else if($lan instanceof Literal) { |
|
93 |
return $lang->getValue(); |
|
94 |
} |
|
95 |
return null; |
|
96 |
} |
|
97 |
||
125 | 98 |
public function getLanguageResolved() { |
99 |
return $this->langResolved; |
|
100 |
} |
|
101 |
public function setLanguageResolved($languageResolved) { |
|
102 |
$this->langResolved = $languageResolved; |
|
103 |
} |
|
104 |
||
105 |
||
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
106 |
public function getTitle() { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
107 |
if($this->title === false) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
108 |
try { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
109 |
$this->title = $this->getProvidedCHO()->getLiteral('<http://purl.org/dc/elements/1.1/title>'); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
110 |
} catch(\Exception $e) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
111 |
$this->title = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
112 |
} |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
113 |
} |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
114 |
return $this->title; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
115 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
116 |
|
28 | 117 |
public function setTitle($value, $lang="fr") { |
118 |
$oldTitle = $this->getTitle(); |
|
119 |
if($oldTitle && $oldTitle->getValue() != $value && $oldTitle->getLang() != $lang) { |
|
120 |
$literalTitle = new Literal($value, $lang, null); |
|
121 |
$this->setSimpleProperty($this->getProvidedCHO(), 'http://purl.org/dc/elements/1.1/title', $oldTitle, $literalTitle); |
|
122 |
//clear cache |
|
123 |
$this->title = false; |
|
124 |
} |
|
125 |
} |
|
126 |
||
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
127 |
public function getTitleValue() { |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
128 |
$title = $this->getTitle(); |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
129 |
return is_null($title)?null:$title->getValue(); |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
130 |
} |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
131 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
132 |
public function getPublishers() { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
133 |
if(is_null($this->publishers)) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
134 |
try { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
135 |
$this->publishers = $this->getProvidedCHO()->all('dc11:publisher'); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
136 |
} catch(\Exception $e) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
137 |
$this->publishers = []; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
138 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
139 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
140 |
return $this->publishers; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
141 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
142 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
143 |
public function getIssued() { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
144 |
if(is_null($this->issued)) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
145 |
try { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
146 |
$this->issued = $this->getProvidedCHO()->getLiteral("<http://purl.org/dc/terms/issued>"); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
147 |
} catch(\Exception $e) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
148 |
$this->issued = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
149 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
150 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
151 |
return $this->issued; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
152 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
153 |
|
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
154 |
public function getIssuedValue() { |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
155 |
$issued = $this->getIssued(); |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
156 |
return is_null($issued)?null:$issued->getValue(); |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
157 |
} |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
158 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
159 |
public function getModified() { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
160 |
if(is_null($this->modified)) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
161 |
try { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
162 |
$this->modified = $this->getProvidedCHO()->getLiteral("<http://purl.org/dc/terms/modified>"); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
163 |
if(is_null($this->modified)) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
164 |
$this->modified = $this->getIssued(); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
165 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
166 |
} catch(\Exception $e) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
167 |
$this->modified = null; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
168 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
169 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
170 |
return $this->modified; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
171 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
172 |
|
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
173 |
public function getModifiedValue() { |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
174 |
$modified = $this->getModified(); |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
175 |
return is_null($modified)?null:$modified->getValue(); |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
176 |
} |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
177 |
|
28 | 178 |
public function setModified($value) { |
179 |
$modified = $this->getModified(); |
|
180 |
if($value && (!$modified || $modified->getValue() != $value) ) { |
|
181 |
||
182 |
$newModified = new Literal($value, "http://purl.org/dc/terms/W3CDTF"); |
|
183 |
$this->setSimpleProperty($this->getProvidedCHO(), 'http://purl.org/dc/terms/modified', $modified, $newModified); |
|
184 |
||
185 |
$this->modified = null; |
|
186 |
} |
|
187 |
} |
|
188 |
||
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
189 |
public function getMediaArray() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
190 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
191 |
if(is_null($this->mediaArray)) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
192 |
//TODO: add media type |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
193 |
$this->mediaArray = []; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
194 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
195 |
$master = $this->get('<http://www.europeana.eu/schemas/edm/isShownBy>'); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
196 |
$masterUrl = is_null($master)?null:$master->getUri(); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
197 |
|
111
af85c436048f
change edm:WebResources to edm:WebResources
ymh <ymh.work@gmail.com>
parents:
28
diff
changeset
|
198 |
foreach($this->graph->allOfType("<http://www.europeana.eu/schemas/edm/WebResource>") as $webResource) { |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
199 |
$extent = $webResource->getLiteral("<http://purl.org/dc/terms/extent>"); |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
200 |
$extent = is_null($extent)?null:$extent->getValue(); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
201 |
$extent_ms = Utils::iso8601IntervalToMillis($extent); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
202 |
$format = $webResource->getLiteral("dc11:format"); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
203 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
204 |
$this->mediaArray[$webResource->getUri()] = [ |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
205 |
'url' => $webResource->getUri(), |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
206 |
'format' => is_null($format)?null:$format->getValue(), |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
207 |
'extent' => $extent, |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
208 |
'extent_ms' => $extent_ms, |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
209 |
'master' => (($webResource->getUri() === $masterUrl)?true:false) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
210 |
]; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
211 |
} |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
212 |
} |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
213 |
return $this->mediaArray; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
214 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
215 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
216 |
public function getTypes() { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
217 |
return $this->getProvidedCHO()->all('dc11:type'); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
218 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
219 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
220 |
public function getDiscourseTypes() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
221 |
return array_values(array_filter($this->getTypes(), function($v) { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
222 |
return $v instanceof Literal && $v->getDatatypeUri() === Config::get('corpusparole.olac_discourse_type')['uri']; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
223 |
})); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
224 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
225 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
226 |
public function getOtherTypes() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
227 |
$res = array_values(array_filter($this->getTypes(), function($v) { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
228 |
return $v instanceof Resource || $v->getDatatypeUri() !== Config::get('corpusparole.olac_discourse_type')['uri']; |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
229 |
})); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
230 |
return $res; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
231 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
232 |
|
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
233 |
public function getContributors() { |
28 | 234 |
if(is_null($this->contributors)) { |
235 |
$this->contributors = array_reduce( |
|
236 |
CocoonUtils::OLAC_ROLES, |
|
237 |
function($res, $olacRole) { |
|
238 |
return array_merge( |
|
239 |
$res, |
|
240 |
array_map( |
|
241 |
function($olacValue) use ($olacRole) { |
|
242 |
return [ |
|
243 |
'name' => ($olacValue instanceof Literal)?$olacValue->getValue():null, |
|
244 |
'nameLiteral' => ($olacValue instanceof Literal)?$olacValue:null, |
|
245 |
'url' => ($olacValue instanceof Resource)?$olacValue->getUri():null, |
|
246 |
'role' => $olacRole |
|
247 |
]; |
|
248 |
}, |
|
249 |
$this->getProvidedCHO()->all("<$olacRole>") |
|
250 |
) |
|
251 |
); |
|
252 |
}, |
|
253 |
[] |
|
254 |
); |
|
255 |
} |
|
256 |
return $this->contributors; |
|
257 |
} |
|
258 |
||
259 |
/** |
|
260 |
* change contributors list |
|
261 |
*/ |
|
262 |
public function setContributors($contributors) { |
|
263 |
$delta = $this->startDelta(); |
|
264 |
//remove old, |
|
265 |
foreach ($this->getContributors() as $contribDef) { |
|
266 |
$value = null; |
|
267 |
if (is_null($contribDef['url'])) { |
|
268 |
if(is_null($contribDef['nameLiteral'])) { |
|
269 |
$value = new Literal($contribDef['name']); |
|
270 |
} else { |
|
271 |
$value = $contribDef['nameLiteral']; |
|
272 |
} |
|
273 |
} else { |
|
274 |
$value = new Resource($contribDef['url']); |
|
275 |
} |
|
276 |
$this->getProvidedCHO()->delete($contribDef['role'], $value); |
|
277 |
$delta->getDeletedGraph()->add($this->getProvidedCHO(), $contribDef['role'], $value); |
|
278 |
} |
|
279 |
||
280 |
//put new |
|
281 |
foreach ($contributors as $newContribDef) { |
|
282 |
$value = null; |
|
283 |
if (is_null($newContribDef['url'])) { |
|
284 |
$value = new Literal($newContribDef['name'], "fr", null); |
|
285 |
} else { |
|
286 |
$value = new Resource($newContribDef['url']); |
|
287 |
} |
|
288 |
$this->getProvidedCHO()->add($newContribDef['role'], $value); |
|
289 |
$delta->getAddedGraph()->add($this->getProvidedCHO(), $newContribDef['role'], $value); |
|
290 |
} |
|
291 |
||
292 |
$this->contributors = null; |
|
293 |
||
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
294 |
} |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
295 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
296 |
/** |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
297 |
* change discourse type list |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
298 |
*/ |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
299 |
public function updateDiscourseTypes(array $discoursesTypes) { |
3
2b3247d02769
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
300 |
|
2b3247d02769
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
301 |
$this->startDelta(); |
2b3247d02769
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
302 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
303 |
//delete |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
304 |
foreach($this->getDiscourseTypes() as $discourseType) { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
305 |
$literalValue = new Literal($discourseType, null, Config::get('corpusparole.olac_discourse_type')['uri']); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
306 |
$this->getProvidedCHO()->delete('dc11:type', $literalValue); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
307 |
$this->currentDelta->getDeletedGraph()->add($this->getProvidedCHO(), 'dc11:type', new Literal($discourseType, null, Config::get('corpusparole.olac_discourse_type')['uri'])); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
308 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
309 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
310 |
// and re-add them |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
311 |
foreach($discoursesTypes as $dType) { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
312 |
$this->getProvidedCHO()->add('dc11:type', new Literal($dType, null, Config::get('corpusparole.olac_discourse_type')['uri'])); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
313 |
$this->currentDelta->getAddedGraph()->add($this->getProvidedCHO(), 'dc11:type', new Literal($dType, null, Config::get('corpusparole.olac_discourse_type')['uri'])); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
314 |
} |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
315 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
316 |
$this->clearMemoizationCache(); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
317 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
318 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
319 |
public function isIsomorphic($doc) { |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
320 |
return Isomorphic::isomorphic($this->graph, $doc->graph); |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
321 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
322 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
323 |
/* |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
324 |
* Clone document. |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
325 |
* clone also the innerDocumenent |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
326 |
*/ |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
327 |
public function __clone() { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
328 |
|
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
329 |
$this->graph = new Graph($this->graph->getUri(), $this->graph->toRdfPhp()); |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
330 |
} |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
331 |
|
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
332 |
public function jsonSerialize() { |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
333 |
if(!$this->graph) { |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
334 |
return [ |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
335 |
'id' => $this->getId(), |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
336 |
]; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
337 |
} else { |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
338 |
$mediaArray = array_map( |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
339 |
function($m) { |
18
f2a40bbc27f6
add rdf mapper + merger + basic database model
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
340 |
$f = Utils::processLiteralOrString($m['format']); |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
341 |
$res = $m; |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
342 |
$res['format'] = $f; |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
343 |
return $res;}, |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
344 |
$this->getMediaArray() |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
345 |
); |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
346 |
|
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
347 |
$publishers = array_map( |
18
f2a40bbc27f6
add rdf mapper + merger + basic database model
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
348 |
function($v) { return Utils::processLiteralOrString($v); }, |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
349 |
$this->getPublishers() |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
350 |
); |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
351 |
|
28 | 352 |
$contributors = array_map( |
353 |
function($c) { unset($c['nameLiteral']); return $c; }, |
|
354 |
$this->getContributors() |
|
355 |
); |
|
356 |
||
128
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
357 |
$res = [ |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
358 |
'id' => $this->getId(), |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
359 |
'uri' => $this->getUri(), |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
360 |
'title' => $this->getTitleValue(), |
28 | 361 |
'language' => $this->getLanguageValue(), |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
362 |
'modified' => $this->getModifiedValue(), |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
363 |
'publishers' => $publishers, |
28 | 364 |
'contributors' => $contributors, |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
365 |
'mediaArray'=> $mediaArray |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
366 |
]; |
128
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
367 |
|
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
368 |
if($this->language_resolved) { |
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
369 |
$res['language_resolved'] = $this->getLanguageResolved(); |
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
370 |
} |
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
371 |
|
bc18286e55b2
remove resolve lexvo on server in the api
ymh <ymh.work@gmail.com>
parents:
125
diff
changeset
|
372 |
return $res; |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
3
diff
changeset
|
373 |
} |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
374 |
} |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
375 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
376 |
} |