Passed
Push — feature/packages ( cc596d...3445e7 )
by Thierry
08:38
created

Jaxon::getVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Jaxon.php - Jaxon class
5
 *
6
 * The Jaxon class uses a modular plug-in system to facilitate the processing
7
 * of special Ajax requests made by a PHP page.
8
 * It generates Javascript that the page must include in order to make requests.
9
 * It handles the output of response commands (see <Jaxon\Response\Response>).
10
 * Many flags and settings can be adjusted to effect the behavior of the Jaxon class
11
 * as well as the client-side javascript.
12
 *
13
 * @package jaxon-core
0 ignored issues
show
Coding Style introduced by
Package name "jaxon-core" is not valid; consider "Jaxoncore" instead
Loading history...
14
 * @author Jared White
0 ignored issues
show
Coding Style introduced by
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
15
 * @author J. Max Wilson
0 ignored issues
show
Coding Style introduced by
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
16
 * @author Joseph Woolley
0 ignored issues
show
Coding Style introduced by
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
17
 * @author Steffen Konerow
0 ignored issues
show
Coding Style introduced by
Content of the @author tag must be in the form "Display Name <[email protected]>"
Loading history...
18
 * @author Thierry Feuzeu <[email protected]>
19
 * @copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
0 ignored issues
show
Coding Style introduced by
@copyright tag must contain a year and the name of the copyright holder
Loading history...
20
 * @copyright Copyright (c) 2008-2010 by Joseph Woolley, Steffen Konerow, Jared White  & J. Max Wilson
0 ignored issues
show
Coding Style introduced by
@copyright tag must contain a year and the name of the copyright holder
Loading history...
21
 * @copyright 2016 Thierry Feuzeu <[email protected]>
22
 * @license https://opensource.org/licenses/BSD-3-Clause BSD 3-Clause License
23
 * @link https://github.com/jaxon-php/jaxon-core
24
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
25
26
namespace Jaxon;
27
28
use Jaxon\Plugin\Plugin;
29
use Jaxon\Plugin\Package;
30
use Jaxon\Utils\DI\Container;
31
use Jaxon\Utils\Config\Reader as ConfigReader;
32
33
use Psr\Log\LoggerInterface;
34
use Psr\Log\NullLogger;
35
use Psr\Log\LoggerAwareTrait;
36
use Psr\Log\LoggerAwareInterface;
37
38
class Jaxon implements LoggerAwareInterface
0 ignored issues
show
Coding Style introduced by
Missing doc comment for class Jaxon
Loading history...
39
{
40
    use Features\Config;
41
    use Features\Translator;
42
    use LoggerAwareTrait;
43
44
    /**
45
     * Package version number
46
     *
47
     * @var string
48
     */
49
    private $sVersion = 'Jaxon 3.0.4';
50
51
    /*
52
     * Request plugins
53
     */
0 ignored issues
show
Coding Style introduced by
Empty line required after block comment
Loading history...
54
    const CALLABLE_CLASS = 'CallableClass';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 4 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
55
    const CALLABLE_DIR = 'CallableDir';
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 6 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
56
    const CALLABLE_FUNCTION = 'CallableFunction';
57
    // For uploaded files.
58
    const FILE_UPLOAD = 'FileUpload';
59
    // For packages.
60
    const PACKAGE = 'Package';
61
    // For compatibility with previous versions
62
    const CALLABLE_OBJECT = 'CallableClass'; // Same as CALLABLE_CLASS
63
    const USER_FUNCTION = 'CallableFunction'; // Same as CALLABLE_FUNCTION
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 3 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
64
65
    /**
66
     * A static instance on this class
67
     *
68
     * @var Jaxon
69
     */
70
    private static $xInstance = null;
71
72
    /**
73
     * The DI container
74
     *
75
     * @var Container
76
     */
77
    private static $xContainer = null;
78
79
    /**
80
     * Get the static instance
81
     *
82
     * @return Jaxon
83
     */
84
    public static function getInstance()
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines before function; 1 found
Loading history...
85
    {
86
        if(self::$xInstance == null)
87
        {
88
            self::$xInstance = new Jaxon();
89
        }
90
        return self::$xInstance;
91
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
92
93
    /**
94
     * The constructor
95
     */
96
    public function __construct()
97
    {
98
        if(self::$xContainer == null)
99
        {
100
            self::$xContainer = new Container();
101
            $this->setDefaultOptions();
102
103
            /*
104
            * Register the Jaxon request and response plugins
0 ignored issues
show
Coding Style introduced by
First line of comment not aligned correctly; expected 13 spaces but found 12
Loading history...
105
            */
0 ignored issues
show
Coding Style introduced by
Last line of comment aligned incorrectly; expected 13 spaces but found 12
Loading history...
Coding Style introduced by
Empty line required after block comment
Loading history...
106
            self::$xContainer->getPluginManager()->registerRequestPlugins();
107
            self::$xContainer->getPluginManager()->registerResponsePlugins();
108
109
            // Set the default logger
110
            $this->setLogger(new NullLogger());
111
        }
112
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
113
114
    /**
115
     * Get the DI container
116
     *
117
     * @return Container
118
     */
119
    public function di()
120
    {
121
        return self::$xContainer;
122
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
123
124
    /**
125
     * The current Jaxon version
126
     *
127
     * @return string
128
     */
129
    public function getVersion()
130
    {
131
        return $this->sVersion;
132
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
133
134
    /**
135
     * Get the logger
136
     *
137
     * @return LoggerInterface
138
     */
139
    public function logger()
140
    {
141
        return $this->logger;
142
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
143
144
    /**
145
     * Get the config reader
146
     *
147
     * @return ConfigReader
148
     */
149
    public function config()
150
    {
151
        return $this->di()->get(ConfigReader::class);
152
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
153
154
    /**
155
     * Set the default options of all components of the library
156
     *
157
     * @return void
158
     */
159
    private function setDefaultOptions()
160
    {
161
        // The default configuration settings.
162
        $this->di()->getConfig()->setOptions([
163
            'core.version'                      => $this->getVersion(),
164
            'core.language'                     => 'en',
165
            'core.encoding'                     => 'utf-8',
166
            'core.decode_utf8'                  => false,
167
            'core.prefix.function'              => 'jaxon_',
168
            'core.prefix.class'                 => 'Jaxon',
169
            // 'core.request.uri'               => '',
170
            'core.request.mode'                 => 'asynchronous',
171
            'core.request.method'               => 'POST', // W3C: Method is case sensitive
172
            'core.response.send'                => true,
173
            'core.response.merge.ap'            => true,
174
            'core.response.merge.js'            => true,
175
            'core.debug.on'                     => false,
176
            'core.debug.verbose'                => false,
177
            'core.process.exit'                 => true,
178
            'core.process.clean'                => false,
179
            'core.process.timeout'              => 6000,
180
            'core.error.handle'                 => false,
181
            'core.error.log_file'               => '',
182
            'core.jquery.no_conflict'           => false,
183
            'js.lib.output_id'                  => 0,
184
            'js.lib.queue_size'                 => 0,
185
            'js.lib.load_timeout'               => 2000,
186
            'js.lib.show_status'                => false,
187
            'js.lib.show_cursor'                => true,
188
            'js.app.dir'                        => '',
189
            'js.app.minify'                     => true,
190
            'js.app.options'                    => '',
191
        ]);
192
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
193
194
    /**
195
     * Get the Global Response object
196
     *
197
     * @return \Jaxon\Response\Response
198
     */
199
    public function getResponse()
200
    {
201
        return $this->di()->getResponse();
202
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
203
204
    /**
205
     * Create a new Jaxon response object
206
     *
207
     * @return \Jaxon\Response\Response
208
     */
209
    public function newResponse()
210
    {
211
        return $this->di()->newResponse();
212
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
213
214
    /**
215
     * Register a plugin
216
     *
217
     * Below is a table for priorities and their description:
218
     * - 0 thru 999: Plugins that are part of or extensions to the jaxon core
219
     * - 1000 thru 8999: User created plugins, typically, these plugins don't care about order
220
     * - 9000 thru 9999: Plugins that generally need to be last or near the end of the plugin list
221
     *
222
     * @param Plugin    $xPlugin        An instance of a plugin
0 ignored issues
show
Coding Style introduced by
Expected 2 spaces after parameter type; 4 found
Loading history...
Coding Style introduced by
Expected 3 spaces after parameter name; 8 found
Loading history...
223
     * @param integer   $nPriority      The plugin priority, used to order the plugins
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 3 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 6 found
Loading history...
224
     *
225
     * @return void
226
     */
227
    public function registerPlugin(Plugin $xPlugin, $nPriority = 1000)
228
    {
229
        $this->di()->getPluginManager()->registerPlugin($xPlugin, $nPriority);
230
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
231
232
    /**
233
     * Register a package
234
     *
235
     * @param string        $sClassName         The package class name
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 9 found
Loading history...
236
     * @param array         $aOptions           The package options
0 ignored issues
show
Coding Style introduced by
Expected 2 spaces after parameter type; 9 found
Loading history...
Coding Style introduced by
Expected 3 spaces after parameter name; 11 found
Loading history...
237
     *
238
     * @return void
239
     */
240
    public function registerPackage($sClassName, array $aOptions = [])
241
    {
242
        $this->di()->getPluginManager()->registerPackage($sClassName, $aOptions);
243
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
244
245
    /**
246
     * Register request handlers, including functions, callable classes and directories.
247
     *
248
     * @param string        $sType            The type of request handler being registered
0 ignored issues
show
Coding Style introduced by
Expected 7 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 5 spaces after parameter name; 12 found
Loading history...
249
     *        Options include:
0 ignored issues
show
Coding Style introduced by
Parameter comment not aligned correctly; expected 40 spaces but found 8
Loading history...
250
     *        - Jaxon::USER_FUNCTION: a function declared at global scope
0 ignored issues
show
Coding Style introduced by
Parameter comment not aligned correctly; expected 40 spaces but found 8
Loading history...
251
     *        - Jaxon::CALLABLE_CLASS: a class who's methods are to be registered
0 ignored issues
show
Coding Style introduced by
Parameter comment not aligned correctly; expected 40 spaces but found 8
Loading history...
252
     *        - Jaxon::CALLABLE_DIR: a directory containing classes to be registered
0 ignored issues
show
Coding Style introduced by
Parameter comment not aligned correctly; expected 40 spaces but found 8
Loading history...
253
     *        - Jaxon::PROCESSING_EVENT:
0 ignored issues
show
Coding Style introduced by
Parameter comment not aligned correctly; expected 40 spaces but found 8
Loading history...
254
     * @param string        $sCallable
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 7 spaces after parameter type; 8 found
Loading history...
255
     *        When registering a function, this is the name of the function
256
     *        When registering a callable class, this is the class name
257
     *        When registering a callable directory, this is the full path to the directory
258
     *        When registering an event, this is the event name
259
     * @param array|string  $xOptions
0 ignored issues
show
Coding Style introduced by
Missing parameter comment
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter type; 2 found
Loading history...
260
     *        When registering a function, this is an (optional) array
261
     *             of call options, or the (optional) include file
262
     *        When registering a callable class, this is an (optional) array
263
     *             of call options for the class methods
264
     *        When registering a callable directory, this is an (optional) array
265
     *             of call options for the class methods, or the (optional) namespace
266
     *
267
     * @return mixed
268
     */
269
    public function register($sType, $sCallable, $xOptions = [])
270
    {
271
        return $this->di()->getPluginManager()->registerCallable($sType, $sCallable, $xOptions);
272
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
273
274
    /**
275
     * Get an instance of a registered class
276
     *
277
     * @param string        $sClassName         The class name
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 9 found
Loading history...
278
     *
279
     * @return mixed
0 ignored issues
show
Documentation introduced by
Consider making the return type a bit more specific; maybe use object|null.

This check looks for the generic type array as a return type and suggests a more specific type. This type is inferred from the actual code.

Loading history...
280
     */
281
    public function instance($sClassName)
282
    {
283
        $xCallable = $this->di()->getCallableRegistry()->getCallableObject($sClassName);
284
        return ($xCallable) ? $xCallable->getRegisteredObject() : null;
285
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
286
287
    /**
288
     * Get a request to a registered class
289
     *
290
     * @param string        $sClassName         The class name
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 9 found
Loading history...
291
     *
292
     * @return \Jaxon\Request\Factory\CallableClass\Request
293
     */
294
    public function request($sClassName)
295
    {
296
        $xInstance = $this->instance($sClassName);
297
        return ($xInstance) ? $xInstance->rq() : null;
298
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
299
300
    /**
301
     * Returns the Jaxon Javascript header and wrapper code to be printed into the page
302
     *
303
     * The javascript code returned by this function is dependent on the plugins
304
     * that are included and the functions and classes that are registered.
305
     *
306
     * @param boolean        $bIncludeJs            Also get the JS files
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 2 spaces after parameter name; 12 found
Loading history...
307
     * @param boolean        $bIncludeCss        Also get the CSS files
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 8 found
Loading history...
308
     *
309
     * @return string
310
     */
311
    public function getScript($bIncludeJs = false, $bIncludeCss = false)
312
    {
313
        return $this->di()->getCodeGenerator()->getScript($bIncludeJs, $bIncludeCss);
314
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
315
316
    /**
317
     * Print the jaxon Javascript header and wrapper code into your page
318
     *
319
     * The javascript code returned by this function is dependent on the plugins
320
     * that are included and the functions and classes that are registered.
321
     *
322
     * @param boolean        $bIncludeJs            Also print the JS files
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 2 spaces after parameter name; 12 found
Loading history...
323
     * @param boolean        $bIncludeCss        Also print the CSS files
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 8 found
Loading history...
324
     *
325
     * @return void
326
     */
327
    public function printScript($bIncludeJs = false, $bIncludeCss = false)
328
    {
329
        print $this->getScript($bIncludeJs, $bIncludeCss);
330
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
331
332
    /**
333
     * Return the javascript header code and file includes
334
     *
335
     * @return string
336
     */
337
    public function getJs()
338
    {
339
        return $this->di()->getCodeGenerator()->getJs();
340
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
341
342
    /**
343
     * Return the CSS header code and file includes
344
     *
345
     * @return string
346
     */
347
    public function getCss()
348
    {
349
        return $this->di()->getCodeGenerator()->getCss();
350
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
351
352
    /**
353
     * Determine if a call is a jaxon request or a page load request
354
     *
355
     * @return boolean
356
     */
357
    public function canProcessRequest()
358
    {
359
        return $this->di()->getRequestHandler()->canProcessRequest();
360
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
361
362
    /**
363
     * If this is a jaxon request, call the requested PHP function, build the response and send it back to the browser
364
     *
365
     * This is the main server side engine for Jaxon.
366
     * It handles all the incoming requests, including the firing of events and handling of the response.
367
     * If your RequestURI is the same as your web page, then this function should be called before ANY
368
     * headers or HTML is output from your script.
369
     *
370
     * This function may exit after the request is processed, if the 'core.process.exit' option is set to true.
371
     *
372
     * @return void
373
     *
374
     * @see <Jaxon\Jaxon->canProcessRequest>
375
     */
376
    public function processRequest()
377
    {
378
        // Check to see if headers have already been sent out, in which case we can't do our job
379
        if(headers_sent($filename, $linenumber))
380
        {
381
            echo $this->trans('errors.output.already-sent', [
382
                'location' => $filename . ':' . $linenumber
383
            ]), "\n", $this->trans('errors.output.advice');
384
            exit();
385
        }
386
387
        $this->di()->getRequestHandler()->processRequest();
388
389
        if(($this->getOption('core.response.send')))
390
        {
391
            $this->di()->getResponseManager()->sendOutput();
392
393
            if(($this->getOption('core.process.exit')))
394
            {
395
                exit();
396
            }
397
        }
398
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
399
400
    /**
401
     * Get a registered response plugin
402
     *
403
     * @param string        $sName                The name of the plugin
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 16 found
Loading history...
404
     *
405
     * @return \Jaxon\Plugin\Response
406
     */
407
    public function plugin($sName)
408
    {
409
        return $this->di()->getPluginManager()->getResponsePlugin($sName);
410
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
411
412
    /**
413
     * Get a package instance
414
     *
415
     * @param string        $sClassName           The package class name
0 ignored issues
show
Coding Style introduced by
Expected 1 spaces after parameter type; 8 found
Loading history...
Coding Style introduced by
Expected 1 spaces after parameter name; 11 found
Loading history...
416
     *
417
     * @return \Jaxon\Plugin\Package
418
     */
419
    public function package($sClassName)
420
    {
421
        return $this->di()->getPluginManager()->getPackage($sClassName);
422
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
423
424
    /**
425
     * Get the upload plugin
426
     *
427
     * @return \Jaxon\Request\Plugin\FileUpload
428
     */
429
    public function upload()
430
    {
431
        return $this->di()->getPluginManager()->getRequestPlugin(self::FILE_UPLOAD);
432
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
433
434
    /**
435
     * Get the request callback manager
436
     *
437
     * @return \Jaxon\Request\Handler\Callback
438
     */
439
    public function callback()
440
    {
441
        return $this->di()->getRequestHandler()->getCallbackManager();
442
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
443
444
    /**
445
     * Get the dialog wrapper
446
     *
447
     * @return \Jaxon\Utils\Dialogs\Dialog
448
     */
449
    public function dialog()
450
    {
451
        return $this->di()->getDialog();
452
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
453
454
    /**
455
     * Get the template engine
456
     *
457
     * @return \Jaxon\Utils\Template\Engine
458
     */
459
    public function template()
460
    {
461
        return $this->di()->getTemplateEngine();
462
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
463
464
    /**
465
     * Get the App instance
466
     *
467
     * @return \Jaxon\App\App
468
     */
469
    public function app()
470
    {
471
        return $this->di()->getApp();
472
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
473
474
    /**
475
     * Get the view renderer
476
     *
477
     * @return \Jaxon\Utils\View\Renderer
478
     */
479
    public function view()
480
    {
481
        return $this->di()->getViewRenderer();
482
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 1 found
Loading history...
483
484
    /**
485
     * Get the session manager
486
     *
487
     * @return \Jaxon\Contracts\Session
488
     */
489
    public function session()
490
    {
491
        return $this->di()->getSessionManager();
492
    }
0 ignored issues
show
Coding Style introduced by
Expected 2 blank lines after function; 0 found
Loading history...
493
}
494