1 | <?php |
||
40 | class Query |
||
41 | { |
||
42 | |||
43 | /** |
||
44 | * provides a means for functional access to the objects of this library |
||
45 | * @return Query a new instance of this object |
||
46 | * @since v1.0.0 |
||
47 | */ |
||
48 | 1 | public static function with() |
|
52 | |||
53 | /** |
||
54 | * adds new data into a PDO connected resource |
||
55 | * @param string $table table with which you wish to append to |
||
56 | * @param array $data a single level associative array containing keys that |
||
57 | * represent the fields and values that represent new values to be added |
||
58 | * into the table |
||
59 | * @return Create a create object that manages the addition of new records |
||
60 | * @since v1.0.0 |
||
61 | */ |
||
62 | 1 | public function create($table, array $data) |
|
66 | |||
67 | /** |
||
68 | * retrieves data from a PDO connected resource |
||
69 | * @param string $table name of the table that houses the data |
||
70 | * @param array $fields optional default value: empty array - defines which |
||
71 | * fields are returned if no fields defined a star will be used |
||
72 | * @param null|WhereStatementInterface $where optional default value: null - |
||
73 | * object used to limit the returned results |
||
74 | * @param integer $fetchStyle optional default value: PDO::FETCH_ASSOC - |
||
75 | * sets how the PDO statement will return records |
||
76 | * @param boolean $fetchFlat optional default value: false - true will |
||
77 | * return one record, false will return all records |
||
78 | * @param mixed $defaultValue optional default value: empty array - |
||
79 | * value to be returned on query failure |
||
80 | * @return Select the select object responsible for retrieving records |
||
81 | * @since v1.0.0 |
||
82 | */ |
||
83 | 1 | public function select( |
|
93 | |||
94 | /** |
||
95 | * changes values of existing data in a PDO connected resource |
||
96 | * @param string $table table with which you wish to update |
||
97 | * @param array $data a single level associative array containing keys that |
||
98 | * represent the fields and values that represent new values to be updated |
||
99 | * into the table |
||
100 | * @param null|WhereStatementInterface $where an object that is designed to |
||
101 | * return a where statement to limit the data that is affected by the update |
||
102 | * @return Update the update object responsible to handling the update of |
||
103 | * persistent records. |
||
104 | * @since v1.0.0 |
||
105 | */ |
||
106 | 1 | public function update($table, array $data, WhereStatementInterface $where = null) |
|
110 | |||
111 | /** |
||
112 | * removes records from a PDO connected resource |
||
113 | * @param string $table table with which you wish to remove records from |
||
114 | * @param null|WhereStatementInterface $where an object that is designed to |
||
115 | * return a where statement to limit the data that is affected by the delete |
||
116 | * @return Delete the delete object responsible for handling removal of |
||
117 | * persistent records |
||
118 | * @since v1.0.0 |
||
119 | */ |
||
120 | 1 | public function delete($table, WhereStatementInterface $where = null) |
|
124 | } |
||
125 |