PluginProbe
Lasso Lite – Affiliate Link Manager & Product Displays / 112
Lasso Lite – Affiliate Link Manager & Product Displays v112
158 157 155 156 154 153 152 151 150 149 148 trunk 0.9.9 104 105 106 107 108 109 110 111 112 113 114 115 All 57 releases
simple-urls / libs / Raven / Util.php

Util.php in Lasso Lite – Affiliate Link Manager & Product Displays 112, at libs/Raven/Util.php

39 lines 717 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /*
4 * This file is part of Raven.
5 *
6 * (c) Sentry Team
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 /**
13 * Utilities
14 *
15 * @package raven
16 */
17
18 class Raven_Util
19 {
20 /**
21 * Because we love Python, this works much like dict.get() in Python.
22 *
23 * Returns $var from $array if set, otherwise returns $default.
24 *
25 * @param array $array
26 * @param string $var
27 * @param mixed $default
28 * @return mixed
29 */
30 public static function get($array, $var, $default = null)
31 {
32 if (isset($array[$var])) {
33 return $array[$var];
34 }
35
36 return $default;
37 }
38 }
39