dimaxz /
SimpleORM
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | namespace SimpleORM; |
||
| 4 | |||
| 5 | /** |
||
| 6 | * Description of Specification |
||
| 7 | * |
||
| 8 | * @author Dmitriy |
||
| 9 | */ |
||
| 10 | class Specification implements ISpecificationCriteria |
||
| 11 | { |
||
| 12 | |||
| 13 | protected $where = []; |
||
| 14 | |||
| 15 | protected $limit = 0; |
||
| 16 | |||
| 17 | protected $ofset = 0; |
||
| 18 | |||
| 19 | protected $joins = []; |
||
| 20 | |||
| 21 | protected $order = []; |
||
| 22 | |||
| 23 | protected $manualJoins = []; |
||
| 24 | |||
| 25 | protected $group = null; |
||
| 26 | |||
| 27 | protected $manualWheres = []; |
||
| 28 | |||
| 29 | protected $whereType = 'AND'; |
||
| 30 | |||
| 31 | protected $manualSelect; |
||
| 32 | |||
| 33 | |||
| 34 | static public function create(){ |
||
|
0 ignored issues
–
show
Coding Style
introduced
by
Loading history...
|
|||
| 35 | return new SELF; |
||
| 36 | } |
||
| 37 | |||
| 38 | function getManualSelect() |
||
|
0 ignored issues
–
show
|
|||
| 39 | { |
||
| 40 | return $this->manualSelect; |
||
| 41 | } |
||
| 42 | |||
| 43 | function setManualSelect($Select) |
||
|
0 ignored issues
–
show
|
|||
| 44 | { |
||
| 45 | $this->manualSelect = $Select; |
||
| 46 | return $this; |
||
| 47 | } |
||
| 48 | |||
| 49 | function getWhere() |
||
|
0 ignored issues
–
show
|
|||
| 50 | { |
||
| 51 | return $this->where; |
||
| 52 | } |
||
| 53 | |||
| 54 | function getLimit() |
||
|
0 ignored issues
–
show
|
|||
| 55 | { |
||
| 56 | return $this->limit; |
||
| 57 | } |
||
| 58 | |||
| 59 | function getOfset() |
||
|
0 ignored issues
–
show
|
|||
| 60 | { |
||
| 61 | return $this->ofset; |
||
| 62 | } |
||
| 63 | |||
| 64 | function getJoins() |
||
|
0 ignored issues
–
show
|
|||
| 65 | { |
||
| 66 | return $this->joins; |
||
| 67 | } |
||
| 68 | |||
| 69 | function getOrder() |
||
|
0 ignored issues
–
show
|
|||
| 70 | { |
||
| 71 | return $this->order; |
||
| 72 | } |
||
| 73 | |||
| 74 | function getManualJoins() |
||
|
0 ignored issues
–
show
|
|||
| 75 | { |
||
| 76 | return $this->manualJoins; |
||
| 77 | } |
||
| 78 | |||
| 79 | function getGroup() |
||
|
0 ignored issues
–
show
|
|||
| 80 | { |
||
| 81 | return $this->group; |
||
| 82 | } |
||
| 83 | |||
| 84 | function getManualWheres() |
||
|
0 ignored issues
–
show
|
|||
| 85 | { |
||
| 86 | return $this->manualWheres; |
||
| 87 | } |
||
| 88 | |||
| 89 | function getWhereType() |
||
|
0 ignored issues
–
show
|
|||
| 90 | { |
||
| 91 | return $this->whereType; |
||
| 92 | } |
||
| 93 | |||
| 94 | function setWhere($field, $value = false) |
||
|
0 ignored issues
–
show
|
|||
| 95 | { |
||
| 96 | if ($value !== false) { |
||
| 97 | $this->where[$field] = $value; |
||
| 98 | } else { |
||
| 99 | $this->where = $field; |
||
| 100 | } |
||
| 101 | |||
| 102 | return $this; |
||
| 103 | } |
||
| 104 | |||
| 105 | function setLimit($limit) |
||
|
0 ignored issues
–
show
|
|||
| 106 | { |
||
| 107 | $this->limit = $limit; |
||
| 108 | return $this; |
||
| 109 | } |
||
| 110 | |||
| 111 | function setOfset($ofset) |
||
|
0 ignored issues
–
show
|
|||
| 112 | { |
||
| 113 | $this->ofset = $ofset; |
||
| 114 | return $this; |
||
| 115 | } |
||
| 116 | |||
| 117 | function setJoins($joins) |
||
|
0 ignored issues
–
show
|
|||
| 118 | { |
||
| 119 | $this->joins = $joins; |
||
| 120 | return $this; |
||
| 121 | } |
||
| 122 | |||
| 123 | function setOrder($order) |
||
|
0 ignored issues
–
show
|
|||
| 124 | { |
||
| 125 | $this->order = $order; |
||
| 126 | return $this; |
||
| 127 | } |
||
| 128 | |||
| 129 | function setManualJoins($manualJoins) |
||
|
0 ignored issues
–
show
|
|||
| 130 | { |
||
| 131 | $this->manualJoins = $manualJoins; |
||
| 132 | return $this; |
||
| 133 | } |
||
| 134 | |||
| 135 | function setGroup($group) |
||
|
0 ignored issues
–
show
|
|||
| 136 | { |
||
| 137 | $this->group = $group; |
||
| 138 | return $this; |
||
| 139 | } |
||
| 140 | |||
| 141 | function setManualWheres($manualWheres) |
||
|
0 ignored issues
–
show
|
|||
| 142 | { |
||
| 143 | $this->manualWheres = $manualWheres; |
||
| 144 | return $this; |
||
| 145 | } |
||
| 146 | |||
| 147 | function setWhereType($whereType) |
||
|
0 ignored issues
–
show
|
|||
| 148 | { |
||
| 149 | $this->whereType = $whereType; |
||
| 150 | return $this; |
||
| 151 | } |
||
| 152 | |||
| 153 | /** |
||
| 154 | * Создание критериев |
||
| 155 | */ |
||
| 156 | public function getCriteria() |
||
| 157 | { |
||
| 158 | |||
| 159 | } |
||
| 160 | } |
||
| 161 |