author | ymh <ymh.work@gmail.com> |
Sat, 06 Aug 2016 21:29:33 +0700 | |
changeset 261 | 02e2396bcbbc |
parent 141 | c0e8626a271c |
child 329 | 0a2c2ad49d75 |
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\Libraries; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
3 |
|
130
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
4 |
use EasyRdf\Literal; |
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
5 |
use EasyRdf\Resource; |
261
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
6 |
use EasyRdf\Graph; |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
7 |
|
130
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
8 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
9 |
/** |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
10 |
* Utilities functions |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
11 |
*/ |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
12 |
class Utils { |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
13 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
14 |
/** |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
15 |
* convert DateIntervals to milliseconds |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
16 |
* Months and year calculated by approximation based on average number |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
17 |
* of days over 4 years (365*4+1) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
18 |
* @param \DateInterval $di the date interval |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
19 |
* @return the number of milliseconds or 0 if $di is null |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
20 |
*/ |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
21 |
public static function dateIntervalToMillis(\DateInterval $di) { |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
22 |
if(is_null($di)) { |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
23 |
return null; |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
24 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
25 |
$seconds = ($di->s) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
26 |
+ ($di->i * 60) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
27 |
+ ($di->h * 60 * 60) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
28 |
+ ($di->d * 60 * 60 * 24) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
29 |
+ ($di->m * (365*4+1)/48*60*60*24) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
30 |
+ ($di->y * (365*4+1)/4*60*60*24); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
31 |
return $seconds*1000; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
32 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
33 |
|
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
34 |
/** |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
35 |
* convert iso8601 strings to milliseconds |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
36 |
* Months and year calculated by approximation based on average number |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
37 |
* of days over 4 years (365*4+1) |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
38 |
* |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
39 |
* @param str iso8601 string |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
40 |
* @return the number of milliseconds or 0 if $str is null |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
41 |
*/ |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
42 |
public static function iso8601IntervalToMillis($str) { |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
43 |
if(is_null($str)) { |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
44 |
return null; |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
45 |
} |
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
46 |
elseif( $str === '') { |
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
47 |
return 0; |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
48 |
} |
20
a9b98b16b053
add contributor list + edition pane
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
49 |
|
19
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
50 |
$di = new \DateInterval($str); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
51 |
return self::dateIntervalToMillis($di); |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
52 |
} |
eadaf0b8f02e
Bo conception step. back to ember page
ymh <ymh.work@gmail.com>
parents:
18
diff
changeset
|
53 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
54 |
/* |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
55 |
* From http://www.thecave.info/php-get-mime-type-from-file-extension/ |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
56 |
*/ |
18
f2a40bbc27f6
add rdf mapper + merger + basic database model
ymh <ymh.work@gmail.com>
parents:
4
diff
changeset
|
57 |
public static function getMimetype($file) { |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
58 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
59 |
// our list of mime types |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
60 |
$mime_types = array( |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
61 |
"pdf"=>"application/pdf", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
62 |
"exe"=>"application/octet-stream", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
63 |
"zip"=>"application/zip", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
64 |
"docx"=>"application/msword", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
65 |
"doc"=>"application/msword", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
66 |
"xls"=>"application/vnd.ms-excel", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
67 |
"ppt"=>"application/vnd.ms-powerpoint", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
68 |
"gif"=>"image/gif", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
69 |
"png"=>"image/png", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
70 |
"jpeg"=>"image/jpg", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
71 |
"jpg"=>"image/jpg", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
72 |
"mp3"=>"audio/mpeg", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
73 |
"wav"=>"audio/x-wav", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
74 |
"mpeg"=>"video/mpeg", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
75 |
"mpg"=>"video/mpeg", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
76 |
"mpe"=>"video/mpeg", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
77 |
"mov"=>"video/quicktime", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
78 |
"avi"=>"video/x-msvideo", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
79 |
"3gp"=>"video/3gpp", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
80 |
"css"=>"text/css", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
81 |
"jsc"=>"application/javascript", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
82 |
"js"=>"application/javascript", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
83 |
"php"=>"text/html", |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
84 |
"htm"=>"text/html", |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
85 |
"html"=>"text/html", |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
86 |
"mp4"=>"video/mp4", |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
87 |
"ogg"=>"video/ogg", |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
88 |
"xml"=>"application/xml", |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
89 |
"xhtml"=>"application/xhtml+xml", |
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
90 |
); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
91 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
92 |
$split_ext = explode('.',$file); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
93 |
$extension = strtolower(end($split_ext)); |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
94 |
|
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
95 |
return $mime_types[$extension]; |
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
96 |
} |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
97 |
|
130
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
98 |
public static function processLiteralResourceOrString($val) { |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
99 |
if(is_null($val)) { |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
100 |
return $val; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
101 |
} |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
102 |
if($val instanceof Literal) { |
141
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
103 |
if(empty($val->getLang()) && empty($val->getDatatypeURI())) { |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
104 |
return $val->getValue(); |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
105 |
} |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
106 |
else { |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
107 |
return [ |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
108 |
'value'=> $val->getValue(), |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
109 |
'datatype'=> $val->getDatatypeURI(), |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
110 |
'lang'=> $val->getLang() |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
111 |
]; |
c0e8626a271c
literal are now objects if one of lang or datatype is not null
ymh <ymh.work@gmail.com>
parents:
130
diff
changeset
|
112 |
} |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
113 |
} |
130
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
114 |
elseif ($val instanceof Resource) { |
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
115 |
return $val->getUri(); |
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
116 |
} |
4
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
117 |
else { |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
118 |
return (string)$val; |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
119 |
} |
f55970e41793
first skeleton of bo client in ember
ymh <ymh.work@gmail.com>
parents:
2
diff
changeset
|
120 |
} |
130
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
121 |
|
261
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
122 |
/** |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
123 |
* @param EasyRdf\Graph $graph1 |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
124 |
* @param EasyRdf\Graph $graph2 |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
125 |
* |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
126 |
* @return EasyRdf\Graph |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
127 |
*/ |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
128 |
public static function mergeGraphs(Graph $graph1, Graph $graph2) |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
129 |
{ |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
130 |
$data1 = $graph1->toRdfPhp(); |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
131 |
$data2 = $graph2->toRdfPhp(); |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
132 |
$merged = array_merge_recursive($data1, $data2); |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
133 |
unset($data1, $data2); |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
134 |
return new Graph($graph1->getUri(), $merged, 'php'); |
02e2396bcbbc
Migrate to ember 2.7 + correct jquery null context error + declare shim for popcorn (instead of silencing the JSHint error)
ymh <ymh.work@gmail.com>
parents:
141
diff
changeset
|
135 |
} |
130
fac22d8c2df8
add subjects to model + simple display on bo + add command to downloads documents to fixtures for test
ymh <ymh.work@gmail.com>
parents:
20
diff
changeset
|
136 |
|
2
00e2916104fe
Migrate to php 5.6 + Laravel 5.1 + add phpunit test
ymh <ymh.work@gmail.com>
parents:
diff
changeset
|
137 |
} |