Completed
Pull Request — master (#37)
by
unknown
01:26
created

Manager::__isset()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php 
2
namespace JMathai\PhpMultiCurl;
3
/**
4
 * Manager manages multicurl handles
5
 *
6
 * @author Jaisen Mathai <[email protected]>
7
 */
8
class Manager
9
{
10
    private $_key;
11
    private $_epiCurl;
12
13
    public function __construct($key)
14
    {
15
        $this->_key = $key;
16
        $this->_epiCurl = MultiCurl::getInstance();
17
    }
18
19
    public function __get($name)
20
    {
21
        $responses = $this->_epiCurl->getResult($this->_key);
22
        return isset($responses[$name]) ? $responses[$name] : null;
23
    }
24
25
    public function __isset($name)
26
    {
27
        $val = self::__get($name);
28
        return empty($val);
29
    }
30
}
31