Completed
Push — master ( a6e7a2...8a3554 )
by Ryan
06:51
created

SaveTableState::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php namespace Anomaly\Streams\Platform\Ui\Table\Command;
2
3
use Anomaly\Streams\Platform\Ui\Table\TableBuilder;
4
use Illuminate\Contracts\Bus\SelfHandling;
5
use Illuminate\Http\Request;
6
use Illuminate\Session\Store;
7
8
/**
9
 * Class SaveTableState
10
 *
11
 * @link          http://pyrocms.com/
12
 * @author        PyroCMS, Inc. <[email protected]>
13
 * @author        Ryan Thompson <[email protected]>
14
 * @package       Anomaly\Streams\Platform\Ui\Table\Command
15
 */
16
class SaveTableState implements SelfHandling
17
{
18
19
    /**
20
     * The table builder.
21
     *
22
     * @var TableBuilder
23
     */
24
    protected $builder;
25
26
    /**
27
     * Create a new SetDefaultOptions instance.
28
     *
29
     * @param TableBuilder $builder
30
     */
31
    public function __construct(TableBuilder $builder)
32
    {
33
        $this->builder = $builder;
34
    }
35
36
    /**
37
     * @param Store   $session
38
     * @param Request $request
39
     */
40
    public function handle(Store $session, Request $request)
41
    {
42
        $session->set('table::' . $request->url(), $request->getQueryString());
43
    }
44
}
45