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