Session::getInspector()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/*
3
 * This file is part of the Pomm's Foundation package.
4
 *
5
 * (c) 2014 - 2017 Grégoire HUBERT <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace PommProject\Foundation;
11
12
use PommProject\Foundation\Session\Session as VanillaSession;
13
14
/**
15
 * Session
16
 *
17
 * Session with Foundation poolers API.
18
 *
19
 * @package     Foundation
20
 * @copyright   2014 - 2017 Grégoire HUBERT
21
 * @author      Grégoire HUBERT
22
 * @license     X11 {@link http://opensource.org/licenses/mit-license.php}
23
 * @see         VanillaSession
24
 */
25
class Session extends VanillaSession
26
{
27
    /**
28
     * getPreparedQuery
29
     *
30
     * Return the prepared query client.
31
     *
32
     * @param   string $query
33
     * @return  \PommProject\Foundation\PreparedQuery\PreparedQuery
34
     */
35
    public function getPreparedQuery($query)
36
    {
37
        return $this->getClientUsingPooler('prepared_query', $query);
38
    }
39
40
    /**
41
     * getQueryManager
42
     *
43
     * Return a query manager (default to QueryManager\SimpleQueryManager)
44
     *
45
     * @param   string              $query_manager
46
     * @return  \PommProject\Foundation\QueryManager\QueryManagerClient
47
     */
48
    public function getQueryManager($query_manager = null)
49
    {
50
        return $this->getClientUsingPooler('query_manager', $query_manager);
51
    }
52
53
    /**
54
     * getConverter
55
     *
56
     * Return a converter client.
57
     *
58
     * @param   string          $name
59
     * @return  \PommProject\Foundation\Converter\ConverterClient
60
     */
61
    public function getConverter($name)
62
    {
63
        return $this->getClientUsingPooler('converter', $name);
64
    }
65
66
    /**
67
     * getObserver
68
     *
69
     * Return an observer client.
70
     *
71
     * @param   string      $name
72
     * @return  \PommProject\Foundation\Observer\Observer
73
     */
74
    public function getObserver($name)
75
    {
76
        return $this->getClientUsingPooler('observer', $name);
77
    }
78
79
    /**
80
     * getInspector
81
     *
82
     * Return the database inspector.
83
     *
84
     * @param   string $name (null)
85
     * @return  \PommProject\Foundation\Inspector\Inspector
86
     */
87
    public function getInspector($name = null)
88
    {
89
        return $this->getClientUsingPooler('inspector', $name);
90
    }
91
92
    /**
93
     * getListener
94
     *
95
     * A short description here
96
     *
97
     * @param   string $name
98
     * @return  \PommProject\Foundation\Listener\Listener
99
     */
100
    public function getListener($name)
101
    {
102
        return $this->getClientUsingPooler('listener', $name);
103
    }
104
}
105