repo.or.cz
/
openemr.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
composer package updates
[openemr.git]
/
vendor
/
mpdf
/
mpdf
/
src
/
Utils
/
Arrays.php
blob
808913dd7dd5440f23b4b0b7f0fcee935b37fda6
1
<
?php
2
3
namespace
Mpdf\Utils
;
4
5
class
Arrays
6
{
7
8
public static function
get
(
$array
,
$key
,
$default
=
null
)
9
{
10
if
(
is_array
(
$array
) &&
array_key_exists
(
$key
,
$array
)) {
11
return
$array
[
$key
];
12
}
13
14
if
(
func_num_args
() <
3
) {
15
throw new
\
InvalidArgumentException
(
sprintf
(
'Array does not contain key "
%s
"'
,
$key
));
16
}
17
18
return
$default
;
19
}
20
}