InitialContextProxy::lookup()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
/**
4
 * \AppserverIo\RemoteMethodInvocation\InitialContextProxy
5
 *
6
 * NOTICE OF LICENSE
7
 *
8
 * This source file is subject to the Open Software License (OSL 3.0)
9
 * that is available through the world-wide-web at this URL:
10
 * http://opensource.org/licenses/osl-3.0.php
11
 *
12
 * PHP version 5
13
 *
14
 * @author    Tim Wagner <[email protected]>
15
 * @author    Bernhard Wick <[email protected]>
16
 * @copyright 2015 TechDivision GmbH <[email protected]>
17
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
 * @link      https://github.com/appserver-io/rmi
19
 * @link      http://www.appserver.io
20
 */
21
22
namespace AppserverIo\RemoteMethodInvocation;
23
24
/**
25
 * Proxy for the container instance itself.
26
 *
27
 * @author    Tim Wagner <[email protected]>
28
 * @author    Bernhard Wick <[email protected]>
29
 * @copyright 2015 TechDivision GmbH <[email protected]>
30
 * @license   http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
31
 * @link      https://github.com/appserver-io/rmi
32
 * @link      http://www.appserver.io
33
 */
34
class InitialContextProxy extends RemoteProxy
35
{
36
37
    /**
38
     * Runs a lookup on the container for the class with the
39
     * passed name.
40
     *
41
     * @param string $className The class name to run the lookup for
42
     *
43
     * @return \AppserverIo\RemoteMethodInvocation\RemoteObjectInterface The instance
44
     */
45
    public function lookup($className)
46
    {
47
        return RemoteProxy::__create($className)->__setSession($this->__getSession());
48
    }
49
}
50