-
-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
104 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
/** | ||
* Trait Explode | ||
* @package Ozdemir\Datatables | ||
*/ | ||
trait Explode | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ | |
*/ | ||
class Request | ||
{ | ||
|
||
/** | ||
* @var ParameterBag | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?php | ||
|
||
|
||
namespace Ozdemir\Datatables; | ||
|
||
use Ozdemir\Datatables\Http\Request; | ||
|
||
/** | ||
* Class Option | ||
* @package Ozdemir\Datatables | ||
*/ | ||
class Option | ||
{ | ||
/** | ||
* @var Request | ||
*/ | ||
private $request; | ||
|
||
/** | ||
* Option constructor. | ||
* @param Request $request | ||
*/ | ||
public function __construct(Request $request) | ||
{ | ||
$this->request = $request; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function draw(): int | ||
{ | ||
return $this->request->get('draw') ?? 0; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function start(): int | ||
{ | ||
return $this->request->get('start') ?? 0; | ||
} | ||
|
||
/** | ||
* @return int | ||
*/ | ||
public function length(): int | ||
{ | ||
return $this->request->get('length') ?? 0; | ||
} | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function searchValue(): string | ||
{ | ||
$search = $this->request->get('search') ?? []; | ||
|
||
return array_key_exists('value', $search) ? $search['value'] : ''; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function order(): array | ||
{ | ||
return $this->request->get('order') ?? []; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function columns(): array | ||
{ | ||
return $this->request->get('columns') ?? []; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,6 @@ | |
|
||
/** | ||
* Class Query | ||
* @package Ozdemir\Datatables | ||
*/ | ||
class Query | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters